Purpose of use_syslog

Sven-Göran Bergh sgb at systemasis.com
Fri Jun 5 13:20:32 CEST 2009



Andreas Ericsson wrote:
>I like the current behaviour, but I'd accept a patch to take 'only' or something
>as an argument to "use_syslog" to make the behaviour you're talking about happen.
>
>Do note that history browsing won't work in the CGI's if nagios.log doesn't get
>written at all, so this option should very, very clearly be marked in such a way
>that unsuspecting new users don't shoot themselves in the foot. Recreating a
>proper nagios.log from the syslog messages is ofcourse possible, but I'd rather
>avoid having to try it if at all possible. Especially given most distributions
>tendency to only keep syslog files around for four weeks before rotating them
>into oblivion. Four weeks means users that want availability reports on a month
>or so won't even realize the data they need isn't where it should be before it
>doesn't exist anymore. Bad Thing(tm) indeed.

I agree totally, but have a slightly related comment.

When using a supervisory process manager, like runit runsv(dir), you really do not
want any output to appear on the console. To my knowledge there is currently no way
to run Nagios in the foreground and not have any output on the console. During
startup you always get something similar to this:

    Nagios 3.0.6
    Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
    Last Modified: 12-01-2008
    License: GPL
    
    Nagios 3.0.6 starting... (PID=2071)
    Local time is Fri Jun 05 12:26:53 CEST 2009

My first expectation on use_syslog was at least to get rid of this output.

Of cause, you may catch console messages when using a process supervisor and
setup an alternative log daemon for them, but if you want them to end up in
syslog that's quite awkward. Further more, redirection to /dev/null does not
play well with process supervisors.

use_syslog is probaly not the best fix for this, since you probably want to
control the Nagios log output in conjuction with a process manager. Maybe a
no_console or a --quiet startup flag is better suited.

/S-G
________________________________________________________
Sven-Göran Bergh, Systemasis AB
________________________________________________________


      __________________________________________________________
Går det långsamt? Skaffa dig en snabbare bredbandsuppkoppling. 
Sök och jämför priser hos Kelkoo.
http://www.kelkoo.se/c-100015813-bredband.html?partnerId=96914325
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20090605/7442165e/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list