[Nagiosplug-help] Problem with check_http within nagios

DeBattista, Joe Joe.DeBattista at ucsf.edu
Fri May 20 00:39:31 CEST 2011


Hi, Werner,
    The idea about there being an ownership issue on the Nagios server was a good one as there were some files owned by root (with the rest owned by Nagios), but status for the cenn client is still showing a status of UNKNOWN with the "no ouput returned from plugin"

-----Original Message-----
From: Werner Flamme [mailto:werner.flamme at ufz.de] 
Sent: Thursday, May 19, 2011 6:51 AM
To: nagiosplug-help at lists.sourceforge.net
Subject: Re: [Nagiosplug-help] Problem with check_http within nagios

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

DeBattista, Joe [19.05.2011 01:06]:
> Hi,
>      I'm trying to use check_http from within nagios, and I keep getting a status UNKNOWN with "no output returned from plugin".  When I run the commands from the command line on both the client and the nagios server, I seem to get the right output, but not from within nagios itself.
> I'm using nagios version 3.0.6 on a RedhHat Linux server, with the check_http from nagios-plugins version 1.4.13. My nagios client is named cenn, and the nagios server is vx8.  
> 
> When I issue the check_nrpe command from vx8, I get the following:
> /usr/local/nagios/libexec/check_nrpe -H cenn -c check_http HTTP OK 
> HTTP/1.1 200 OK - 308 bytes in 0.001 seconds 
> |time=0.000777s;5.000000;10.000000;0.000000 size=308B;;;0
> 
>>From the client, cenn, the command also seems to run ok.
> /usr/local/nagios/libexec/check_http -H 127.0.0.1 -w 5 -c 10 HTTP OK 
> HTTP/1.1 200 OK - 308 bytes in 0.001 seconds 
> |time=0.000797s;5.000000;10.000000;0.000000 size=308B;;;0

Hi Joe,

do you enter the commands as root or as the user nagios/nrpe are running under? As root, you may try something like

su - nagios -c "/usr/local/nagios/libexec/check_nrpe -H cenn -c check_http"

(in one line).

Since the command works when executed directly and gives the desired output, it seems to be a rights problem on the nagios server.

I'm running nagios on SLES, and had to change owner and group of /var/lib/nagios (and its contents) to nagios.nagios before I was able to see nice results.

HTH
Werner
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAk3VID4ACgkQk33Krq8b42PdbwCfQciI8uNzKz5qrHRyiaymCopr
PN8AnA9CKAzYb0fxjLtPhMrRg0GvDA3L
=Wr2I
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null




More information about the Help mailing list