[Nagiosplug-devel] Fix for check_nagios plugin with Nagios 2.03b

Andreas Ericsson ae at op5.se
Tue Jul 12 07:52:31 CEST 2005

sean finney wrote:
> hi scott,
> On Mon, Jul 11, 2005 at 08:12:45PM +0200, Scott Greenman wrote:
>>I just started using nagios2.03b with the latest plugins, and found
>> that the check_nagios plugin wasn't correctly computing the time
>> since last update of the status log. I found several people who
>> had reported this problem on the nagiosplug-help list, but no responses.
>> I tweaked the plugin code and it seems to work correctly now. I
>> don't know how to go about contributing this change to the community,
>> so I'm just posting a diff here and if someone more in the know
>> wants to pick it up, great....
> the "preferred" way would be if you could open up a ticket in the bug
> tracker on the sourceforge site.  you could include in the report such
> a patch.
>>The problem is a difference between the status log file formats
>> between versions of Nagios. I have no idea in what version of Nagios
>> this change occurred. Implimenting this change will fix  the plugin
>> for Nagios 2.0b3, but will break it for earlier versions. Ultimately
>> it seems that two different plugins are needed, or one plugin that
>> has a flag to indicate which Nagios verison or can check the Nagios
>> version itself.
> i think what would be best is a cmdline option to enable the nagios v2
> specific format, or perhaps as you suggest an automatic detection.

Why not simply use the stat.st_mtime? Actually parsing the data seems a 
waste of cycles if you ask me.

Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer

More information about the Devel mailing list