Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_ping behaves different between EL8 (working) and EL9 (IPv6 broken) #175

Open
pbiering opened this issue Dec 28, 2023 · 3 comments
Open

Comments

@pbiering
Copy link
Contributor

While migrating monitoring system from EL8 to EL9 a strange issue was found:

  • EL9 check_ping from RPM has a problem, option -6 is not proper honored and ping is called with -4
rpm -qf /opt/omd/versions/5.20-labs-edition/lib/monitoring-plugins/check_ping
omd-5.20-labs-edition-el9-1.x86_64

/opt/omd/versions/5.20-labs-edition/lib/monitoring-plugins/check_ping -V
check_ping v2.3.3 (monitoring-plugins 2.3.3)

/opt/omd/versions/5.20-labs-edition/lib/monitoring-plugins/check_ping -H ipv6.bieringer.de -w 3000.0,80% -c 5000.0,100% -p 5 -6
/usr/sbin/ping -4 -n -U -w 30 -c 5 ipv6.bieringer.de
CRITICAL - Could not interpret output from ping command
  • EL8 check_ping from RPM is ok
rpm -qf /opt/omd/versions/5.20-labs-edition/lib/monitoring-plugins/check_ping
omd-5.20-labs-edition-el8-1.x86_64

/opt/omd/versions/5.20-labs-edition/lib/monitoring-plugins/check_ping -V
check_ping v2.3.3 (monitoring-plugins 2.3.3)

/opt/omd/versions/5.20-labs-edition/lib/monitoring-plugins/check_ping -H ipv6.bieringer.de -w 3000.0,80% -c 5000.0,100% -p 5 -6
PING OK - Packet loss = 0%, RTA = 12.23 ms|rta=12.230000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0;

BTW: copy of binary check_ping from EL8 to EL9 would be a workaround as it is running even on next major version.

@pbiering
Copy link
Contributor Author

found even more curious behavior while tweaking local DNS resolution:

/opt/omd/versions/5.20-labs-edition/lib/monitoring-plugins/check_ping -H ipv6.bieringer.de -w 3000.0,80% -c 5000.0,100% -p 5 -6
/usr/sbin/ping -4 -n -U -w 30 -c 5 ipv6.bieringer.de
PING OK - Packet loss = 0%, RTA = 0.12 ms|rta=0.119000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0;
/usr/sbin/ping: ipv6.bieringer.de: Address family for hostname not supported

does it try IPv4 ping even in case of -6 is supplied?

@sni
Copy link
Contributor

sni commented Jan 5, 2024

you can always add -vvv to see the actual ping command executed.

@pbiering
Copy link
Contributor Author

pbiering commented Feb 1, 2024

The issue still persists on 5.30 and EL9:

opt/omd/versions/5.30-labs-edition/lib/monitoring-plugins/check_ping -h
check_ping v2.3.5 (monitoring-plugins 2.3.5)
...
Usage:
check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%
 [-p packets] [-t timeout] [-4|-6]
...
 -4, --use-ipv4
    Use IPv4 connection
 -6, --use-ipv6
    Use IPv6 connection
...

Result is that -6 is not honored and -4 is selected

/opt/omd/versions/5.30-labs-edition/lib/monitoring-plugins/check_ping -H ftp6.bieringer.de -w 3000.0,80% -c 5000.0,100% -p 5 -6
/usr/sbin/ping -4 -n -U -w 30 -c 5 ftp6.bieringer.de
CRITICAL - Could not interpret output from ping command
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants