sh: /check_ping: No such file or directory

Paul O'Rorke paul at paulororke.net
Tue Oct 18 23:08:07 CEST 2005


Thanks for getting back Subhendu

Subhendu Ghosh wrote:


>> Paul O'Rorke wrote:
>>
>  
>
>>>> *Hi all,
>>>>
>>>> I'm sure this is covered somewhere in the docs but I can't seem to find
>>>> it.  I've read a lot of posts but I'm just not gettign it.  I've
>>>> installed Nagios in the past successfully but have run into a bit of a
>>>> problem here that I can't figure out.
>>>>
>>>> After building Nagios and the plugins on **Fedora Core4 **with : (from
>>>> the docs)
>>>>    *    [root at nagios nagios-2.0b4]# ./configure
>>>> --prefix=//usr/local/nagios/ --with-cgiurl=//nagios/cgi-bin/
>>>> --with-htmurl=/nagios// --with-nagios-user=/nagios/
>>>> --with-nagios-group=/nagios/ --with-command-group=/nagios
>>>>
>>>> /**and the plugins with just :
>>>> *
>>>> *    [root at nagios nagios-plugins-1.4.2]#./configure*
>>>> **
>>>> *I can test the setup with :*
>>>> *    /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg*
>>>> *and it passes :*
>>>> *<snip>*
>>>> *    Total Warnings: 0*
>>>> *    Total Errors:   0*
>>>> **
>>>> *    Things look okay - No serious problems were detected during the
>>>> pre-flight check
>>>>
>>>> **Yet when I try to run with **:*
>>>> *    /usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg*
>>>> **
>>>> I get this :
>>>>          Nagios 2.0b4
>>>>     Copyright (c) 1999-2005 Ethan Galstad (http://www.nagios.org)
>>>>     Last Modified: 08-02-2005
>>>>     License: GPL
>>>>
>>>>     Nagios 2.0b4 starting... (PID=21936)
>>>>     sh: /check_ping: No such file or directory
>>>>     Warning: Return code of 127 for check of service 'PING' on host
>>>> 'BEFVP41' was out of bounds. Make sure the plugin you're trying to run
>>>> actually exists.
>>>>     sh: /check_ping: No such file or directory
>>>>     Warning: Attempting to execute the command "/check_ping -H
>>>> 192.168.123.1 -w 3000.0,80% -c 5000.0,100% -p 1" resulted in a return
>>>> code of 127.   Make sure the script or binary you are trying to execute
>>>> actually exists...
>>>>
>>>> I believe the plugin is there because I can run the folowing:
>>>> # /usr/local/nagios/libexec/check_ping -H 192.168.123.1 -w 3000.0,80% -c
>>>> 5000.0,100% -p 1
>>>> PING OK - Packet loss = 0%, RTA = 6.09 ms
>>    
>>
>>
>>
>>
>>
>> Take a look at the service definition for PING on BEFVP41.
>> Follow that to the command definition.  Most likely a mis-typed MACRO.
>>
>> nagios -v does not verify the existence of the plugins - only the
>> logic of the config files.
>>
>  
>
>From /usr/local/nagios/etc/services.cfg
# Service definition
define service{
        use                             generic-service         ; Name
of service template to use

        host_name                       BEFVP41
        service_description             PING
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  admin
        notification_interval           240
        notification_period             24x7
        notification_options            c,r
        check_command                   check_ping!100.0,20%!500.0,60%
        }


and from /usr/local/nagios/etc/checkcommands.cfg :
# 'check_ping' command definition
define command{
        command_name    check_ping
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c
$ARG2$ -p 5
        }

I can't see what's wrong here.


>>
>  
>
>>>>
>>>> I wonder in which config file the path to the plugins specified?  Is it
>>>> dependant on the CGIs?  I as this because I think that my permissions
>>>> for access to the CGIs is wrong too?  I believe I correctly followed the
>>>> documentation at http://nagios.sourceforge.net/docs/2_0/cgiauth.html but
>>>> still get an error when I point my web browser at any of the CGI
>>>> generated pages.  The Nagios page and docs are fine
>>>> (usr/local/nagios/share) - just the CGIs.  The CGIs are in
>>>> /usr/local/nagios/sbin and all have 776 permissions, owner nagios, group
>>>> nagios.
>>>>
>>>> from /var/log/httpd/error.log:
>>>>     [Tue Oct 18 07:43:07 2005] [error] [client 192.168.123.120]
>>>> (13)Permission denied: exec of '/usr/local/nagios/sbin/tac.cgi' failed,
>>>> referer: http://nagios.paulororke.net/nagios/side.html
>>>>     [Tue Oct 18 07:43:07 2005] [error] [client 192.168.123.120]
>>>> Premature end of script headers: tac.cgi, referer:
>>>> http://nagios.paulororke.net/nagios/side.html
>>>>
>>>>
>>    
>>
>>
>> Do the CGIs share group perms with httpd process?
>  
>

[root at nagios nagios-2.0b4]# cat /etc/group |grep nagios
nagios:x:501:apache,nagios

[root at nagios nagios-2.0b4]# ls -l /usr/local/nagios/sbin/
total 2256
-rwxrwxr-x  1 nagios nagios 164736 Oct 18 06:59 avail.cgi
-rwxrwxr-x  1 nagios nagios 163892 Oct 18 06:59 cmd.cgi
-rwxrwxr-x  1 nagios nagios 126304 Oct 18 06:59 config.cgi
-rwxrwxr-x  1 nagios nagios 182292 Oct 18 06:59 extinfo.cgi
-rwxrwxr-x  1 nagios nagios 134400 Oct 18 06:59 histogram.cgi
-rwxrwxr-x  1 nagios nagios 115552 Oct 18 06:59 history.cgi
-rwxrwxr-x  1 nagios nagios 111456 Oct 18 06:59 notifications.cgi
-rwxrwxr-x  1 nagios nagios 109468 Oct 18 06:59 outages.cgi
-rwxrwxr-x  1 nagios nagios 108576 Oct 18 06:59 showlog.cgi
-rwxrwxr-x  1 nagios nagios 163228 Oct 18 06:59 status.cgi
-rwxrwxr-x  1 nagios nagios 128000 Oct 18 06:59 statusmap.cgi
-rwxrwxr-x  1 nagios nagios 124192 Oct 18 06:59 statuswml.cgi
-rwxrwxr-x  1 nagios nagios 111456 Oct 18 06:59 statuswrl.cgi
-rwxrwxr-x  1 nagios nagios 131968 Oct 18 06:59 summary.cgi
-rwxrwxr-x  1 nagios nagios 128508 Oct 18 06:59 tac.cgi
-rwxrwxr-x  1 nagios nagios 137920 Oct 18 06:59 trends.cgi


I still don't get it...


>>
>> -- 
>> -sg
>  
>



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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