check_ping can't interpret output

Dave Close dave.close at us.thalesgroup.com
Tue Jul 29 07:31:56 CEST 2008


I have the same version of Nagios installed on a dozen systems (not 
machines, full systems with several hundred machines each). Except for 
the specific list of machines, the configuration is identical between 
them. All are installed by yum from the Fedora 7 RPMs, version 
2.10-3.fc7. All the plugins were installed the same way and are version 
1.4.11-2.fc7.

On one system only, check_host_alive (which calls check_ping) reports 
that all machines are down, while at the same time Nagios reports that 
most services on those machines are up. Running check_ping as root from 
the command line gets a successful response. Digging further, I have 
enabled user "apache", which is the user httpd runs as, then tried the 
command as user apache. Here is the result.

# /usr/lib/nagios/plugins/check_ping -H machine -w 3000.0,80% -c 
5000.0,100% -p 1
PING OK - Packet loss = 0%, RTA = 0.16 ms
# su - apache -c "/usr/lib/nagios/plugins/check_ping -H machine -w 
3000.0,80% -c 5000.0,100% -p 1"
/bin/ping -n -U -w 10 -c 1 machine
CRITICAL - Could not interpret output from ping command

Some online references appear to suggest this could be caused by a LANG 
environment variable. I temporarily replaced the check_ping command with 
a wrapper script that saved the environment to a file before calling the 
actual command. There was no difference in LANG and the only other 
differences had to do with the name of the last machine tested. All 
systems report LANG=en_US.UTF-8.

I have compared every configuration file for Nagios and Apache between 
systems and not found any unexpected discrepancy. I have verified the 
installation of all relevant packages (rpm -V). I can't find anything 
which explains the different behavior on the one system. Other 
suggestions are welcome.
-- 
Dave Close


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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