Debugging a plugin

Steve Garcia sgarcia at bak.rr.com
Tue Oct 26 22:18:49 CEST 2004


Andreas Ericsson wrote:
> Jason Martin wrote:
> 
>> On Mon, Oct 25, 2004 at 04:28:38PM -0700, Steve Garcia wrote:
>>
>>> Is there a way to log the actual command issued by nagios to perform 
>>> a service check?  
>>
>>
>> A permutation of the 'strace' command can do that for you.
>>
> 
> Or ./configure --enable-DEBUG3; make nagios and then run it as a 
> foreground process with
> nagios nagios.cfg > output.log 2>&1 &
> to redirect all output to output.log and detach it from terminal. Then 
> use the web-interface to force the check you wish to run.
> output.log should contain all the info you need (and plenty more as well).

That solved my problem.  As I'd suspected, I can a configuration 
problem, but I just want seeing it.  Apparently when I initially 
installed Nagios (6 mos. ago) I had set my PREFIX such that everything 
ended up in /usr/local rather than /usr/local/nagios.  Thus I had a 
complete set of plugins living in /usr/local/libexec.  At the time I 
must have noticed the problem and redone it, but not deleted the extra 
plugins, so Nagios was using the wrong set.  Any additional plugins 
(like the netsaint_statd ones) went where they belonged, but 
resource.cfg was pointing to the wrong place, so for Nagios, those 
plugins didn't exist.

A couple of minutes looking at the logs made that jump out at me.

Thanks!


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
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