Debugging a plugin

Steve Garcia sgarcia at bak.rr.com
Tue Oct 26 01:28:38 CEST 2004


Is there a way to log the actual command issued by nagios to perform a 
service check?  I can see how the command is configured, but I'd like 
some way to log it as it is expanded, and if possible, to see the raw 
output.

Here's my problem.  I'm using netsaint_statd (2.15) to monitor disk 
space, etc on a remote machine.  All the built in plugins work just 
fine, but all the netsaint_statd plugins show up in the Service Detail 
as "(no output!)".

Nagios 1.2 is running on a Solaris 8 machine, and the remote machine is 
a Digital Unix system.  I'm convinced the problem is with either my 
Nagios setup or with some sort of path issue on the Nagios host.

When run from the command line, the check_disk.pl (and check_users.pl, 
etc.) works great.  I had to hack both check_disk.pl and netsaint_statd 
a bit to get them to recognize some of the OSF1 disks:

#  ./check_du_disk.pl pegasus fac_domain#fac
Disk ok - 5.44G (34%) free on /fac

but that shouldn't affect this problem.

If I delete the statd plugins, there's no difference.  I still get "(No 
output!)".  If I write a simple plugin that returns 0 and always prints 
"It's Broke" and drop it in place, I still get "(no output!)".

I tried adding logging commands inside check_disk.pl, and got no 
logging.  It logs fine when run from the command line.  This makes me 
think that either the script is never being called, or if it is it fails 
  so quickly (a perl problem maybe?) that it never gets to the logging 
statements.

Anyone have any idea how I can track this down?  Is there some way to 
log the actual commands issued, and even better, what the response/error 
messages might be?



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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