[Nagiosplug-help] Problem with check_http within nagios

DeBattista, Joe Joe.DeBattista at ucsf.edu
Thu May 19 01:06:44 CEST 2011


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


Here's my entries:
On the nagios server, in the  checkcommands.cfg I have
# 'check_http' command definition
define command{
        command_name    check_http
        command_line    $USER1$/check_http -H $HOSTADDRESS$

I've defined the service in minimal.cfg to check the server, cenn's http process as 
define service{
        use                             generic-service         ; Name of service template to use
        host_name                       cenn
        service_description             Process httpd: Check Access
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              10
        normal_check_interval           5
        retry_check_interval            2
        contact_groups                  admins
        notification_options            u,c,r
        notification_interval           960
        notification_period             24x7
        check_command                   check_nrpe!check_http
        }

On my client, cenn, I defined an entry in nrpe.cfg
command[check_http]=/usr/local/nagios/libexec/check_http -H 127.0.0.1 -w 5 -c 10


Any ideas?




More information about the Help mailing list