[Nagiosplug-help] Problem with check_http within nagios

Werner Flamme werner.flamme at ufz.de
Fri May 20 14:10:00 CEST 2011


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

Did you try the
/usr/local/nagios/libexec/check_nrpe -H cenn -c check_http
command as user nagios? Did this user get a proper response? When root
gets the response, but nagios does not, nagios may not be allowed to
read the SSL certificates that are used to communicate.

What about the ownership of /var/spool/nagios? The results of each check
is stored here. On my nagios server, it is
drwxrwsr-x  2 nagios nagcmd     4096 20. Mai 13:50 nagios

The g+s right is on purpose...

Then there is the long and painful way through the logs.

In my /var/log/xinetd.log on the client, I find a lot of entries like

11/5/20 at 13:24:39: START: nrpe from=141.65.171.57
11/5/20 at 13:24:39: EXIT: nrpe status=0 duration=0(sec)

Are they present at your cenn box too? Maybe in the nrpe daemon log,
when you have it running as a daemon? They tell me at least that there
was a nrpe call from my nagios server, and nrpe had no problems acting
at it.



DeBattista, Joe [20.05.2011 00:39]:
> 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
> 
> 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

-
------------------------------------------------------------------------------
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

-
------------------------------------------------------------------------------
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


- -- 
Werner Flamme, Abt. WKDV
Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
Helmholtz Centre for Environmental Research - UFZ
Permoserstr. 15 - 04318 Leipzig
Tel./phone: +49 341 235-1921 - Fax +49 341 235-451921
Information nach §§ 37a HGB, 35a GmbHG:
Sitz der Gesellschaft: Leipzig
Registergericht: Amtsgericht Leipzig, Handelsregister Nr. B 4703
Vorsitzender des Aufsichtsrats: MinR Wilfried Kraus
Wissenschaftlicher Geschäftsführer: Prof. Dr. Georg Teutsch
Administrativer Geschäftsführer: Dr. Andreas Schmidt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAk3WWhcACgkQk33Krq8b42NKHgCfQA3yzcvf+TbaA4qS/KjVFCfr
93wAn0FUaXsqMvIn/n0nX3vTy2iXBmDa
=seRA
-----END PGP SIGNATURE-----




More information about the Help mailing list