Plugin works interactively but not in Nagios

Jeff Mercer mercer at btitelecom.net
Thu May 8 23:15:09 CEST 2003


I've got Nagios 1.0 running on a RedHat 8.0 x86 system. It's working
quite nicely though I have a lot of tweaking to do to the configs before
moving it into production. I'm using the Nagios Plugin set 1.3 installed 
via RPM.

Here's my issue: I have several checks that always return an error code 
when they are performed by the Nagios daemon. Yet when executing the
exact same command interactively, the check works fine. I'm doing the
interactive check from the actual system running the Nagios software,
and even using the Nagios account itself.

The plugin in question is "check_http". Here's the command that works
fine interactively:

   check_http -S -I x.x.x.x -p 6666 -a user:pass

Here's a typical result:

   HTTP ok: HTTP/1.0 200 OK - 0.102 second response time |time= 0.102

Yet when I define a check command such as this:

   $USER1$/check_http -S -I $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ [etc]

And then invoke it in a service check like this:

   check_https!-p!6666!-a!user:pass

The check always fails with the error message "Socket timeout after 10 
seconds". When doing a similar check against the same remote system but 
on a different port, I get the error message "Unable to open TCP socket".

What's really frustrating is not being able to see exactly what command 
Nagios actually forks when it does the check. I'm pretty sure it must be 
munging something in the check command. Though i get absolutely no 
errors when starting/restarting nagios.

The only other unusual thing is this issue only seems to happen when 
checking that particular remote system. I'm doing http and https checks 
on a number of other systems and get normal results. I've already 
confirmed it's not a firewall issue.

Any suggestions on how to trouble shoot this, or folks who've seen 
similar problems? Any assistance would be greatly appreciated!





-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

_______________________________________________
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