sh: /check_ping: No such file or directory

Paul O'Rorke paul at paulororke.net
Wed Oct 19 05:01:33 CEST 2005


Perhaps I was premature saying that Nagios is running nicely...

whoops!
Error:  Could not read host and service status information!

In the FAQ about this it mentions disk space limitations for the
partition with the status.log and where nagios is installed but I gave
several GB of space.  I can find no evidence of a status.log or
status.dat file anywhere on the system even though a ps listing shows
nagios to be running.  I also get an error in /var/log/nagios/nagios.log
about a failure to daemonize

# service nagios start
[1129687596] Nagios 2.0b4 starting... (PID=5145)
[1129687596] LOG VERSION: 2.0
[1129687596] You do not have permission to write to /var/run/nagios.pid
[1129687596] Bailing out due to errors encountered while attempting to
daemonize... (PID=5145)
[1129688753] Nagios 2.0b4 starting... (PID=5337)
[1129688753] LOG VERSION: 2.0

# ps aux |grep -i nagios
3nagios    5337  0.0  0.2  12548  1220 pts/2    Sl   19:25   0:00
/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
root      5905  0.0  0.1   3764   712 pts/0    S+   19:46   0:00 grep -i
nagios

from "/usr/local/nagios/etc/nagios.cfg" line 71
status_file=/usr/local/nagios/var/status.log

If Nagios has started (PID=5337) why does it not create the status.log
file for the CGIs to read?


John P. Rouillard wrote:

>In message <43556437.5090507 at paulororke.net>,
>"Paul O'Rorke" writes:
>  
>
>>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)
>>>>>>[...]
>>>>>>    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
>>>>>>            
>>>>>>
>
>Above is clue 1.
>
>  
>
>>>>>>    Warning: Attempting to execute the command "/check_ping -H
>>>>>>            
>>>>>>
>
>Here is clue 2.
>
>  
>
>>>>>>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
>>>>>>            
>>>>>>
>
>Nagios doesn't think its in /usr/local/.../check_ping.
>
>  
>
>>>>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.
>>    
>>
>
>What is your resource file setting and what is $USER1$ defined to be?
>Look at the error, sh is trying to exec /check_ping not
>/usr/local/.../check_ping. Got to be $USER1$ macro misfiring.
>
>				-- rouilj
>John Rouillard
>===========================================================================
>My employers don't acknowledge my existence much less my opinions.
>  
>


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