[Nagiosplug-help] Problem with check_http within nagios
Werner Flamme
werner.flamme at ufz.de
Thu May 19 15:50:54 CEST 2011
-----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-----
More information about the Help
mailing list