sh: /check_ping: No such file or directory

Subhendu Ghosh sghosh at sghosh.org
Tue Oct 18 23:47:10 CEST 2005


Paul O'Rorke wrote:
<snip>
>>>>>
>>>>>     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.


In nagios.cfg  - are you including resource.cfg which defines $USER1$


> 
> 
>>  
>>
>>>>> 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?
>>  
>>
> <snip>
> 
> I still don't get it...
> 
> 

1. As per Marc's note - make sure SELinux is not enforcing.
2. Is nagios user a member of the httpd group? or is httpd user a member 
of nagios group?




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