nagiostats Config Parameters
Andreas Ericsson
ae at op5.se
Thu May 24 11:30:38 CEST 2012
On 05/18/2012 12:52 AM, Jochen Bern wrote:
> On 05/11/2012 09:34 PM, Jochen Bern wrote:
>> Everyone,
>> I played with the "-c" and "-s" Parameters of a 3.2.3's nagiostats today
>> and noticed the odd behavior shown below. I didn't look at the source
>> yet, much less write a patch, but I thought you might want to check on
>> 3.3.x and 3.4.x beforehand (and maybe extend t/705nagiostats.t a bit).
>
> To answer my own (implied) question:
>
> base/nagiostats.c uses a different subroutine, read_nagiostats_file(),
> to read and parse a status file named by the -s option; when parsing
> nagios.cfg (default or -c option) and grabbing the value of the
> status_file directive there, read_status_file() is used instead.
>
> As far as I can tell, read_status_file() matches the current status.dat
> syntax, while read_nagiostats_file() expects a format that plain isn't
> to be found anywhere else anymore. For example, it's the only place in
> the code where I can find the string "nagios_version", which it parses for.
>
> The figure nagiostats outputs for NUMSVCOK (the one I focused on in my
> last post - *not* the only one resulting in wrong numbers) is actually
> *counted* in status.dat by read_status_file(), while
> read_nagiostats_file() expects it to be *stated* as "services_ok" in the
> file read; again, this seems to be the only place in the code where
> "services_ok" appears *as a string* (rather than a variable of the same
> name).
>
> Any chance that the -s option might be reappropriated to read the
> current status.dat files via read_status_file(), rather than a format
> lost in the sands of time ... ?
>
Sounds like you've already done a large part of the analysis, so it might
be good if you did the patch as well.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
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.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
More information about the Developers
mailing list