The problem
You want to use the check_ping
plug-in under Nagios to check the accessibility of a host. The plug-in runs for a time and performs the pings, but then reports:
CRITICAL - Could not interpret output from ping command
This phenomenon occurs, for example, on SuSE LINUX 9.3.
The cause
Depending on the language setting, ping
outputs different text and character encodings. These are not parsed properly by check_ping
.
You can test your language setting on the shell with:
root@linux# echo $LANG
de_DE.UTF-8
The solution
Reset the language system-wide on the Nagios server. On a single shell you can do this with:
root@linux# LANG=
Under SUSE LINUX the language is set system-wide in the /etc/sysconfig/language file
. Set the RC_LANG
variable to an empty value:
/etc/sysconfig/language:RC_LANG=""