How to debug plugin getting into UNKNOWN state

Paul L. Allen pla at softflare.com
Tue Mar 9 16:23:00 CET 2004


Markus Baertschi writes: 

> I found the problem by adding some debugging and logging code to
> the plugin (writing to a separate file).

That's always a useful technique with perl. 

> The main problem was that the running nagios and the user nagios
> did not have the same environment (.profile is not executed when
> starting nagios) and this fooled me.

Another gotch, if you use utils.pm (as you should), is that it wipes
your environment clean so you can't rely on the normal PATH being
there. 

-- 
Paul Allen
Softflare Support 




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&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