Purpose of use_syslog

Andreas Ericsson ae at op5.se
Fri Jun 5 10:47:38 CEST 2009


Jon Angliss wrote:
> On Tue, 2 Jun 2009 09:07:48 -0600, "Steven D. Morrey"
> <smorrey at ldschurch.org> wrote:
> 
>> Ahhah! I see the error of my ways.
>> I just needed to look a bit higher up, basically the write_to_syslog is being called from both logging functions, and the use_syslog option is checked only in the write_to_syslog function as a sort of bail out point.
>> That makes sense, but I wanted the option to mean something a little different, so now I've modified the write_to_all_logs and write_to_all_logs_with_timestamp to check for use_syslog and only write out the regular log file if use_syslog is false.
>> This way I don't double my logging overhead.  Now use_syslog means use_syslog only :)
> 
> This is how I'd expected it to be as well, but not how it actually is.
> Application bug? Or documentation bug?  Either way, it's a little
> vauge, and could do with clearing up.
> 

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.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Register now for Nordic Meet on Nagios, June 3-4 in Stockholm
 http://nordicmeetonnagios.op5.org/

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

------------------------------------------------------------------------------
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




More information about the Developers mailing list