monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: syslog facility


From: rory
Subject: Re: syslog facility
Date: Wed, 4 Jun 2003 07:54:53 -0700 (PDT)

One should only be setting facility to either LOG_USER, LOG_DAEMON, or
LOG_LOCALx.
I can change that easily enough.

> I though about different syntax:
>
> set logfile {/path/to/log|syslog [[with] facility xxx]}
>
> where 'facility' is new statement optional for syslog, 'xxx' is choice
> of 'auth', 'authpriv', 'cron', 'daemon', 'ftp', 'kern', 'lpr', 'mail',
> 'mark', 'news', 'security' (same as  auth),  'syslog',  'user',  'uucp'
>  and 'local0' through 'local7'. It is complete list of facility names
> which is used/supported by syslog daemons too - i think it will be
> better to use these common names (more friendly to user).
>
> Taken from syslog.h:
>
> CODE facilitynames[] =
>  {
>    { "auth", LOG_AUTH },
>    { "authpriv", LOG_AUTHPRIV },
>    { "cron", LOG_CRON },
>    { "daemon", LOG_DAEMON },
>    { "ftp", LOG_FTP },
>    { "kern", LOG_KERN },
>    { "lpr", LOG_LPR },
>    { "mail", LOG_MAIL },
>    { "mark", INTERNAL_MARK },          /* INTERNAL */
>    { "news", LOG_NEWS },
>    { "security", LOG_AUTH },           /* DEPRECATED */
>    { "syslog", LOG_SYSLOG },
>    { "user", LOG_USER },
>    { "uucp", LOG_UUCP },
>    { "local0", LOG_LOCAL0 },
>    { "local1", LOG_LOCAL1 },
>    { "local2", LOG_LOCAL2 },
>    { "local3", LOG_LOCAL3 },
>    { "local4", LOG_LOCAL4 },
>    { "local5", LOG_LOCAL5 },
>    { "local6", LOG_LOCAL6 },
>    { "local7", LOG_LOCAL7 },
>    { NULL, -1 }
>  };
>
> What about such syntax for facility?
>
>
> Hint with individual priority for log messages sounds good - it will be
>  possible to differentiate less or more important messages.
> +1 for it
>
> Martin
>
>
> address@hidden wrote:
>
>>I've added the capability to choose LOG_LOCALn (see cvs comments).
>>
>>I'll add the docs later. While I'm at it, it looks like I need to:
>>
>>make sure everything compiles and runs on Solaris and FreeBSD
>>finish MacOSX
>>
>>Also, I noticed we log everything as LOG_ERROR. (I spent an hour trying
>>to figure out why my openlog() call wasn't working like I thought it
>>was, only to find we invoked
>>syslog(LOG_USR|LOG_ERR, "")
>>
>>Anyway, I think it would be worthwhile to add a parameter to log() that
>>is ignored unless we're using syslog. This would pass the priority to
>>syslog. So, for adding priority to individual log messages: +1
>>
>>
>>
>>
>>>Super :)
>>>
>>>I'm working on device stuff again (after lot of weeks being busy for
>>>my
>>> employer + health). I will prepare next patch on sunday, maybe it
>>> will be mature enough to sync it into CVS.
>>>
>>>Martin
>>>
>>>
>>>Rory Toma wrote:
>>>
>>>
>>>
>>>>I agree (+1) and I'll put it in next week (after I finish rewriting
>>>>some Makefiles at work...)
>>>>
>>>>On Fri, 2003-05-30 at 13:55, Martin Pala wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>Hi,
>>>>>
>>>>>i have one question - what about to add possibility to choose syslog
>>>>>facility to monit?
>>>>>
>>>>>In our environment (tens of servers) we use central syslog server,
>>>>>which  catches feeds from all services. With some more feature rich
>>>>>syslog  servers (such as syslog-ng) it is not issue to have the same
>>>>>facility  for different targets (you can filter logs with the same
>>>>>facility by  program name), but with OS default and widely used
>>>>>syslog (linux,  solaris, ...) the only way is to set other facility
>>>>>(for example local3,  etc.) which can be then redirected to other
>>>>>syslog server (all or  nothing rule).
>>>>>
>>>>>example:
>>>>>
>>>>>user.debug      /var/log/messages    #system messages which we won't
>>>>>for  some reason to send to central-syslog server
>>>>>local3.debug   @central-syslog        #monit messages which should
>>>>>be send to cetral-syslog server
>>>>>
>>>>>If it will be possible to set local3 facility in monitrc, then it
>>>>>will be easy to do it without changing system syslog server SW.
>>>>>
>>>>>What about it?
>>>>>
>>>>>I'm +1 for adding syslog facility option to monit.
>>>>>
>>>>>Cheers,
>>>>>Martin
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>_______________________________________________
>>>>>monit-dev mailing list
>>>>>address@hidden
>>>>>http://mail.nongnu.org/mailman/listinfo/monit-dev
>>>>>
>>>>>
>>>>>------------------------------------------------------------------------
>>>>>
>>>>>_______________________________________________
>>>>>monit-dev mailing list
>>>>>address@hidden
>>>>>http://mail.nongnu.org/mailman/listinfo/monit-dev
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>_______________________________________________
>>>monit-dev mailing list
>>>address@hidden
>>>http://mail.nongnu.org/mailman/listinfo/monit-dev
>>>
>>>
>>
>>
>>
>>
>>_______________________________________________
>>monit-dev mailing list
>>address@hidden
>>http://mail.nongnu.org/mailman/listinfo/monit-dev
>>
>>
>
>
>
>
> _______________________________________________
> monit-dev mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/monit-dev






reply via email to

[Prev in Thread] Current Thread [Next in Thread]