DaveClose
Joined: 08 Apr 2008 Posts: 27
|
Posted: Mon Jul 28, 2008 3:52 pm Post subject: check_ping "Could not interpret output from ping comman |
|
|
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 behaviour on the one system. Other suggestions are welcome. |
|