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

sean finney seanius at seanius.net
Mon Jul 11 16:28:41 CEST 2005


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.  you
could probably do the latter by examining the first/last line in the status
log and comparing it against what you would expect to see in either
version.  in any case, unified (-u) diffs are preferred, and any
help you could provide would be appreciated.

 
 	sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20050711/673eea3d/attachment.sig>


More information about the Devel mailing list