Return code of 127 is out of bounds

hkung1 thkung at yahoo.com
Sat Apr 12 10:12:32 CEST 2003


Hi all,
        I'm getting this status information "Status Information: (Return
code of 127 is out of bounds - plugin may be missing) ". I need to monitor HTTP at my test server (namely PBSR01) from my nagios monitoring server. Whenever a warning is received, i'll need to do a http post to a url (as coded in the script).

Below are the details obtained from nagios.log:

nagios.log
----------
[1050115566] Warning: Return code of 127 for check of 
service 'test-HTTP' on host 'PBSR01' was out of bounds. 
Make sure the plugin you're trying to run actually exists.

I've defined test-HTTP in my services.cfg as below :

define service{
        use                             generic-service         ; Name of
service template to use

        host_name                       PBSR01
        service_description             test-HTTP
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           1
        retry_check_interval            1
        contact_groups                  admins
        notification_interval           120
        notification_period             24x7
        notification_options            w,u,c,r
        check_command                   check_http_test
}

and checkcommands.cfg :

define command{
        command_name    check_http_test
        command_line    $USER1$/script_test
}

Below is my script_test in directory libexec :

#!/bin/bash

cStatus=1

result="`/usr/local/nagios/libexec/check_http -I 172.27.0.1`"

echo $result

if [ "$result" == "HTTP ok: HTTP/1.1 200 OK - 0.003 second response time
|time= 0.003" ]; then
        echo "http status ok"
        cStatus=0
        exit $cStatus
elif [ "$result" == "HTTP WARNING: HTTP/1.1 403 Access Forbidden" ]; then
        echo "http with warning status"
        ./script_test2.pl
        cStatus=1
        exit $cStatus
else
        echo "http with critical status";
        cStatus=2
        exit $cStatus
fi


script_test2.pl is just another perl script to do a http post to a URL. 
script_test works fine when i execute it manually. However it's not being triggered by nagios. 
Anyone has any ideas when have gone wrong? There shouldn't be any issue regarding permissions. 
Your help is greatly appreciated!



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.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