[Pkg-nagios-devel] Bug#705900: Bug#705900: check_ping fail if host do not have IPv6 address
Jan Wagner
waja at cyconet.org
Mon Apr 22 07:05:44 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
tag 705900 + moreinfo unreproducible
thanks
Hi Petter,
thanks for taking time to reporting your issue.
Am 22.04.2013 00:22, schrieb Petter Reinholdtsen:
> The DNS host name in question only resolve to an IPv4 address, but ping6
> is tried nevertheless:
>
> root at tjener:~# host tjener.intern
> tjener.intern has address 10.0.2.2
> root at tjener:~# /usr/lib/nagios/plugins/check_ping -H tjener.intern -w 10,10% -c 10,10%
> /bin/ping6 -n -U -w 10 -c 5 tjener.intern
> CRITICAL - Could not interpret output from ping command
> root at tjener:~#
I tried to reproduce your problem on an i386 and amd64 system, but all
worked as expected:
waja at bodengruppe:~$ dpkg -l | grep nagios-plugins-basic
ii nagios-plugins-basic 1.4.16-1 amd64 Plugins for nagios compatible monitoring systems
waja at bodengruppe:~$ /usr/lib/nagios/plugins/check_ping -vvv -H test.test.org -w 10,10% -c 10,10%
CMD: /bin/ping -n -U -w 10 -c 5 test.test.org
Output: PING test.test.org (127.0.0.1) 56(84) bytes of data.
Output: 64 bytes from 127.0.0.1: icmp_req=1 ttl=64 time=0.020 ms
Output: 64 bytes from 127.0.0.1: icmp_req=2 ttl=64 time=0.029 ms
Output: 64 bytes from 127.0.0.1: icmp_req=3 ttl=64 time=0.034 ms
Output: 64 bytes from 127.0.0.1: icmp_req=4 ttl=64 time=0.032 ms
Output: 64 bytes from 127.0.0.1: icmp_req=5 ttl=64 time=0.037 ms
Output:
Output: --- test.test.org ping statistics ---
Output: 5 packets transmitted, 5 received, 0% packet loss, time 3997ms
Output: rtt min/avg/max/mdev = 0.020/0.030/0.037/0.007 ms
PING OK - Packet loss = 0%, RTA = 0.03 ms|rta=0.030000ms;10.000000;10.000000;0.000000 pl=0%;10;10;0
10.000000:10% 10.000000:10%
waja at bb:~$ dpkg -l | grep nagios-plugins-basic
ii nagios-plugins-basic 1.4.16-1 i386 Plugins for nagios compatible monitoring systems
waja at bb:~$ /usr/lib/nagios/plugins/check_ping -vvv -H test.test.org -w 10,10% -c 10,10%
CMD: /bin/ping -n -U -w 10 -c 5 test.test.org
Output: PING test.test.org (127.0.0.1) 56(84) bytes of data.
Output: 64 bytes from 127.0.0.1: icmp_req=1 ttl=64 time=0.027 ms
Output: 64 bytes from 127.0.0.1: icmp_req=2 ttl=64 time=0.032 ms
Output: 64 bytes from 127.0.0.1: icmp_req=3 ttl=64 time=0.040 ms
Output: 64 bytes from 127.0.0.1: icmp_req=4 ttl=64 time=0.046 ms
Output: 64 bytes from 127.0.0.1: icmp_req=5 ttl=64 time=0.044 ms
Output:
Output: --- test.test.org ping statistics ---
Output: 5 packets transmitted, 5 received, 0% packet loss, time 3997ms
Output: rtt min/avg/max/mdev = 0.027/0.037/0.046/0.010 ms
PING OK - Packet loss = 0%, RTA = 0.04 ms|rta=0.037000ms;10.000000;10.000000;0.000000 pl=0%;10;10;0
10.000000:10% 10.000000:10%
> The issue seem to be similar to the ones reported in
> <URL: http://bugs.debian.org/597068 > and
> <URL: http://bugs.debian.org/629640 >, but those reports seem to be
> related to problems with hosts where AAAA records are present. This is
> not the case here.
>
> Could you please change check_ping to use IPv4 ping if no AAAA entry is
> present in DNS?
Right from the sourcecode of the plugin:
"#ifdef PING6_COMMAND
if (address_family != AF_INET && is_inet6_addr(addresses[i]))
rawcmd = strdup(PING6_COMMAND);
else
rawcmd = strdup(PING_COMMAND);
#else
rawcmd = strdup(PING_COMMAND);
#endif"
Looks not bad.
If you can give me more informations, maybe I can dig into it.
Many thanks, Jan.
- --
Never write mail to <waja at spamfalle.info>, you have been warned!
- -----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a C+++ UL++++ P+ L+++ E--- W+++ N+++ o++ K++ w--- O M V- PS
PE Y++
PGP++ t-- 5 X R tv- b+ DI D+ G++ e++ h---- r+++ y++++
- ------END GEEK CODE BLOCK------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iD8DBQFRdOFD9u6Dud+QFyQRArwmAKDVsIC997YpSJ2bcTIoNYdV8FIrigCfSMCv
RXrXWAVdBzt5BlAYomQ0Keg=
=Rvu1
-----END PGP SIGNATURE-----
More information about the Pkg-nagios-devel
mailing list