'Check_ping' returns /usr/sbin/ping6 -n -U -w 10 -c 5 localh
Posted: Fri Feb 23, 2018 9:06 pm
Moderator Edit: This thread has been split from another - https://support.nagios.com/forum/viewto ... =7&t=23099
In the future, please create a new thread and link to the old one instead of adding on.
I met the same problem.
When using ip address, hostname or FQDN to check other hosts, the check is OK.
However, when using FQDN to check self, the check tries /sbin/ping6, which is not expected.
/usr/local/nagios/libexec/check_ping -V
check_ping v2.2.1 (nagios-plugins 2.2.1)
# try localhost - OK
./check_ping -H localhost -w 100,10% -c 200,20%
PING OK - Packet loss = 0%, RTA = 0.14 ms|rta=0.143000ms;100.000000;200.000000;0.000000 pl=0%;10;20;0
# try self IP address OK
./check_ping -H xxx.xxx.xxx.129 -w 100,10% -c 200,20%
PING OK - Packet loss = 0%, RTA = 0.09 ms|rta=0.091000ms;100.000000;200.000000;0.000000 pl=0%;10;20;0
# show you DNS resolution from self FQDN to self IP address
host nagios1.xxx.xxx.xxx
nagios1.xxx.xxx.xxx has address xxx.xxx.xxx.129
# try self FQDN - failed
./check_ping -H nagios1.xxx.xxx.xxx -w 100,10% -c 200,20%
/sbin/ping6 -n -U -W 10 -c 5 nagios1.xxx.xxx.xxx
CRITICAL - Could not interpret output from ping command
In the future, please create a new thread and link to the old one instead of adding on.
I met the same problem.
When using ip address, hostname or FQDN to check other hosts, the check is OK.
However, when using FQDN to check self, the check tries /sbin/ping6, which is not expected.
/usr/local/nagios/libexec/check_ping -V
check_ping v2.2.1 (nagios-plugins 2.2.1)
# try localhost - OK
./check_ping -H localhost -w 100,10% -c 200,20%
PING OK - Packet loss = 0%, RTA = 0.14 ms|rta=0.143000ms;100.000000;200.000000;0.000000 pl=0%;10;20;0
# try self IP address OK
./check_ping -H xxx.xxx.xxx.129 -w 100,10% -c 200,20%
PING OK - Packet loss = 0%, RTA = 0.09 ms|rta=0.091000ms;100.000000;200.000000;0.000000 pl=0%;10;20;0
# show you DNS resolution from self FQDN to self IP address
host nagios1.xxx.xxx.xxx
nagios1.xxx.xxx.xxx has address xxx.xxx.xxx.129
# try self FQDN - failed
./check_ping -H nagios1.xxx.xxx.xxx -w 100,10% -c 200,20%
/sbin/ping6 -n -U -W 10 -c 5 nagios1.xxx.xxx.xxx
CRITICAL - Could not interpret output from ping command