Debug output from plugins

Matt Pounsett matt.pounsett at cira.ca
Tue Sep 30 17:45:49 CEST 2003


I'm bringing this up again because the problem seems to be getting worse.  I
dropped my reaper frequency from 5 to 2 seconds and set a max process limit of
21 (suggested by nagios -s), and the frequency of "No output!" errors from
this plugin jumped from 25% to 52%.

This would seem to suggest that it has something to do with Nagios' internal
processing.. but I have no idea what.

I'm going to make an official feature request here.. hopefully this is the
right place..  I'd like to see an error.log file added, which grabs *all*
lines of stderr when plugins output data to stderr.  I'm thinking this could
be analogous to the way Apache handles stderr output from CGIs.  For Nagios,
I'd recommend writing a timestamp (which matches the corresponding timestamp
in nagios.log), some detail about which service check generated the output,
and then all lines of output to stderr.  It could be made configurable to
optionally also capture all lines to stdout, for some extreme debugging cases.

Would anyone else find this useful?

On Fri, 26 Sep 2003, Matt Pounsett wrote:

> 
> Is there any way to get Nagios to log more of what the plugins dump to
> stderr and stdout?  
> 
> I'm having an issue with a custom plugin of mine, which (according to Nagios)
> is /periodically/ existing with status UNKNOWN and no output (it does this
> maybe 1 execution in 100).   It's a fairly simple perl script, and all
> instances of exit() are preceeded by output to stdout.  So, the only reason I
> can think of for Nagios to report this is if perl completely failed to compile
> the script -- except then I should get some other exit value besides 3.
> 
> I suspect it's Nagios that has the problem, not the script, but I'd like to
> absolutely rule out problems with the script first.  I would try dumping some
> debug output from the script, except that I can't find a way to get Nagios to
> capture that information... anyone have any ideas?
> 
> 

-- 
Matt Pounsett                 CIRA - Canadian Internet Registration Authority
Technical Support Programmer                    350 Sparks Street, Suite 1110
matt.pounsett at cira.ca                                 Ottawa, Ontario, Canada
613.237.5335 ext. 231                                      http://www.cira.ca



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list