[Nagiosplug-devel] [ nagiosplug-Bugs-2896201 ] check_ping depends on iputils-ping
SourceForge.net
noreply at sourceforge.net
Wed Apr 14 15:02:23 CEST 2010
Bugs item #2896201, was opened at 2009-11-11 21:37
Message generated for change (Comment added) made by cyco_dd
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2896201&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: release-1.4.15
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jan Wagner (cyco_dd)
Assigned to: Thomas Guyot-Sionnest (dermoth)
Summary: check_ping depends on iputils-ping
Initial Comment:
The following Bugreport we got against our debian package:
Hi,
it seems that the nagios related packages need an ping command available.
They choose iputils-ping, which is rather linux specific.
Could be possible to switch (at least on non-linux)
to inetutils-ping (already available) or fping (modulo #555398 available).
It will help to kfreebsd-i386, kfreebsd-amd64 and hurd architectures.
Thanks for considering it.
You can track the bugreport via
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=555532
check_ping could maybe rewritten/patched to use liboping [1]?
Thanks and kind regards, Jan.
[1] http://verplant.org/liboping/
----------------------------------------------------------------------
>Comment By: Jan Wagner (cyco_dd)
Date: 2010-04-14 15:02
Message:
Hi there,
we (in Debian BTS) have two withlist bugs against inetutils-ping to
implement the needed functionellity:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565137
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566845
I think we should wait for them and look what we can to afterwards.
----------------------------------------------------------------------
Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2010-01-12 07:07
Message:
Reopening for correctness...
I'll test when I have a chance, hopefully before march ;)
----------------------------------------------------------------------
Comment By: Jan Wagner (cyco_dd)
Date: 2010-01-10 15:31
Message:
As already stated beside this lovely bugtracking system, the patch worked
so far.
With migrating over to inetutils-ping I get signifiant number of " Plugin
timed out after 10 seconds":
[1263115380] SERVICE ALERT: svn.kvirc.de;PING;CRITICAL;SOFT;1;CRITICAL -
Plugin timed out after 10 seconds
[1263115440] SERVICE ALERT: svn.kvirc.de;PING;OK;SOFT;2;PING OK - Packet
loss = 0%, RTA = 0.00 ms
It seems that one (or more, but not all) echo replies get lost .. so we
should get a result from the plugin, but no timeout.
A ping command with such a issue (and tcpdump) is:
sid:~# LANG=C /bin/ping -vv -n -c 5 192.168.30.1| perl -ne 'print
scalar(localtime).": ".$_'
Sun Jan 10 13:56:29 2010: PING 192.168.30.1 (192.168.30.1): 56 data bytes
Sun Jan 10 13:56:29 2010: 64 bytes from 192.168.30.1: icmp_seq=2 ttl=64
time=0.000 ms
Sun Jan 10 13:56:29 2010: 64 bytes from 192.168.30.1: icmp_seq=3 ttl=64
time=0.000 ms
Sun Jan 10 13:56:29 2010: 64 bytes from 192.168.30.1: icmp_seq=4 ttl=64
time=0.000 ms
Sun Jan 10 13:56:29 2010: --- 192.168.30.1 ping statistics ---
Sun Jan 10 13:56:29 2010: 5 packets transmitted, 3 packets received, 40%
packet loss
Sun Jan 10 13:56:29 2010: round-trip min/avg/max/stddev =
0.000/0.000/0.000/0.000 ms
13:56:14.877014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
192.168.30.66 > 192.168.30.1: ICMP echo request, id 58702, seq 0,
length 64
13:56:15.877014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
192.168.30.66 > 192.168.30.1: ICMP echo request, id 58702, seq 256,
length 64
13:56:16.877014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
192.168.30.66 > 192.168.30.1: ICMP echo request, id 58702, seq 512,
length 64
13:56:16.877014 IP (tos 0x0, ttl 64, id 62395, offset 0, flags [none],
proto ICMP (1), length 84)
192.168.30.1 > 192.168.30.66: ICMP echo reply, id 58702, seq 512,
length 64
13:56:17.877014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
192.168.30.66 > 192.168.30.1: ICMP echo request, id 58702, seq 768,
length 64
13:56:17.877014 IP (tos 0x0, ttl 64, id 62396, offset 0, flags [none],
proto ICMP (1), length 84)
192.168.30.1 > 192.168.30.66: ICMP echo reply, id 58702, seq 768,
length 64
13:56:18.877014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
192.168.30.66 > 192.168.30.1: ICMP echo request, id 58702, seq 1024,
length 64
13:56:18.877014 IP (tos 0x0, ttl 64, id 62397, offset 0, flags [none],
proto ICMP (1), length 84)
192.168.30.1 > 192.168.30.66: ICMP echo reply, id 58702, seq 1024,
length 64
13:56:39.293014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
As long this regression is not fixed, I'm not able to upload a package
using inetutils-ping, but this keeps nagios-plugins uninstallable on
non-linux archs. Since Debian is freezing in March, I run a little bit out
of time, to get this issue done and a new stable release uploaded (and
thins settled).
If you need more information or help with debugging, please don't hesitate
to contact me.
Many thanks, Jan.
----------------------------------------------------------------------
Comment By: Jan Wagner (cyco_dd)
Date: 2010-01-10 15:31
Message:
As already stated beside this lovely bugtracking system, the patch worked
so far.
With migrating over to inetutils-ping I get signifiant number of " Plugin
timed out after 10 seconds":
[1263115380] SERVICE ALERT: svn.kvirc.de;PING;CRITICAL;SOFT;1;CRITICAL -
Plugin timed out after 10 seconds
[1263115440] SERVICE ALERT: svn.kvirc.de;PING;OK;SOFT;2;PING OK - Packet
loss = 0%, RTA = 0.00 ms
It seems that one (or more, but not all) echo replies get lost .. so we
should get a result from the plugin, but no timeout.
A ping command with such a issue (and tcpdump) is:
sid:~# LANG=C /bin/ping -vv -n -c 5 192.168.30.1| perl -ne 'print
scalar(localtime).": ".$_'
Sun Jan 10 13:56:29 2010: PING 192.168.30.1 (192.168.30.1): 56 data bytes
Sun Jan 10 13:56:29 2010: 64 bytes from 192.168.30.1: icmp_seq=2 ttl=64
time=0.000 ms
Sun Jan 10 13:56:29 2010: 64 bytes from 192.168.30.1: icmp_seq=3 ttl=64
time=0.000 ms
Sun Jan 10 13:56:29 2010: 64 bytes from 192.168.30.1: icmp_seq=4 ttl=64
time=0.000 ms
Sun Jan 10 13:56:29 2010: --- 192.168.30.1 ping statistics ---
Sun Jan 10 13:56:29 2010: 5 packets transmitted, 3 packets received, 40%
packet loss
Sun Jan 10 13:56:29 2010: round-trip min/avg/max/stddev =
0.000/0.000/0.000/0.000 ms
13:56:14.877014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
192.168.30.66 > 192.168.30.1: ICMP echo request, id 58702, seq 0,
length 64
13:56:15.877014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
192.168.30.66 > 192.168.30.1: ICMP echo request, id 58702, seq 256,
length 64
13:56:16.877014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
192.168.30.66 > 192.168.30.1: ICMP echo request, id 58702, seq 512,
length 64
13:56:16.877014 IP (tos 0x0, ttl 64, id 62395, offset 0, flags [none],
proto ICMP (1), length 84)
192.168.30.1 > 192.168.30.66: ICMP echo reply, id 58702, seq 512,
length 64
13:56:17.877014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
192.168.30.66 > 192.168.30.1: ICMP echo request, id 58702, seq 768,
length 64
13:56:17.877014 IP (tos 0x0, ttl 64, id 62396, offset 0, flags [none],
proto ICMP (1), length 84)
192.168.30.1 > 192.168.30.66: ICMP echo reply, id 58702, seq 768,
length 64
13:56:18.877014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
192.168.30.66 > 192.168.30.1: ICMP echo request, id 58702, seq 1024,
length 64
13:56:18.877014 IP (tos 0x0, ttl 64, id 62397, offset 0, flags [none],
proto ICMP (1), length 84)
192.168.30.1 > 192.168.30.66: ICMP echo reply, id 58702, seq 1024,
length 64
13:56:39.293014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
As long this regression is not fixed, I'm not able to upload a package
using inetutils-ping, but this keeps nagios-plugins uninstallable on
non-linux archs. Since Debian is freezing in March, I run a little bit out
of time, to get this issue done and a new stable release uploaded (and
thins settled).
If you need more information or help with debugging, please don't hesitate
to contact me.
Many thanks, Jan.
----------------------------------------------------------------------
Comment By: Jan Wagner (cyco_dd)
Date: 2010-01-10 15:10
Message:
As stated in private communication, the patch works .. so far.
When migrating over to inetutils-ping, I get significant amount of "Plugin
timed out after 10 seconds" like this:
[1263115380] SERVICE ALERT: svn.kvirc.de;PING;CRITICAL;SOFT;1;CRITICAL -
Plugin timed out after 10 seconds
[1263115440] SERVICE ALERT: svn.kvirc.de;PING;OK;SOFT;2;PING OK - Packet
loss = 0%, RTA = 0.00 ms
The used command is: "/usr/lib/nagios/plugins/check_ping -H
'$HOSTADDRESS$' -w '100.0,20%' -c '500.0,60%' -4"
This ping command result in the following tcpdump snipset:
sid:~# LANG=C /bin/ping -vv -n -c 5 192.168.30.1| perl -ne 'print
scalar(localtime).": ".$_'
Sun Jan 10 13:56:29 2010: PING 192.168.30.1 (192.168.30.1): 56 data bytes
Sun Jan 10 13:56:29 2010: 64 bytes from 192.168.30.1: icmp_seq=2 ttl=64
time=0.000 ms
Sun Jan 10 13:56:29 2010: 64 bytes from 192.168.30.1: icmp_seq=3 ttl=64
time=0.000 ms
Sun Jan 10 13:56:29 2010: 64 bytes from 192.168.30.1: icmp_seq=4 ttl=64
time=0.000 ms
Sun Jan 10 13:56:29 2010: --- 192.168.30.1 ping statistics ---
Sun Jan 10 13:56:29 2010: 5 packets transmitted, 3 packets received, 40%
packet loss
Sun Jan 10 13:56:29 2010: round-trip min/avg/max/stddev =
0.000/0.000/0.000/0.000 ms
13:56:14.877014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
192.168.30.66 > 192.168.30.1: ICMP echo request, id 58702, seq 0,
length 64
13:56:15.877014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
192.168.30.66 > 192.168.30.1: ICMP echo request, id 58702, seq 256,
length 64
13:56:16.877014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
192.168.30.66 > 192.168.30.1: ICMP echo request, id 58702, seq 512,
length 64
13:56:16.877014 IP (tos 0x0, ttl 64, id 62395, offset 0, flags [none],
proto ICMP (1), length 84)
192.168.30.1 > 192.168.30.66: ICMP echo reply, id 58702, seq 512,
length 64
13:56:17.877014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
192.168.30.66 > 192.168.30.1: ICMP echo request, id 58702, seq 768,
length 64
13:56:17.877014 IP (tos 0x0, ttl 64, id 62396, offset 0, flags [none],
proto ICMP (1), length 84)
192.168.30.1 > 192.168.30.66: ICMP echo reply, id 58702, seq 768,
length 64
13:56:18.877014 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
ICMP (1), length 84)
192.168.30.66 > 192.168.30.1: ICMP echo request, id 58702, seq 1024,
length 64
13:56:18.877014 IP (tos 0x0, ttl 64, id 62397, offset 0, flags [none],
proto ICMP (1), length 84)
192.168.30.1 > 192.168.30.66: ICMP echo reply, id 58702, seq 1024,
length 64
As we (debian) have freeze in March and this is a bug preventing to
migrate over to inetutils-ping to get nagios-plugins installed on non-linux
archs, this is a major showstopper to upload the long awaiting new release
andget things settled before freeze.
If you need any information and help fpr debugging, please don't hasitate
to contact me.
Many thanks, Jan.
----------------------------------------------------------------------
Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-12-06 15:53
Message:
This problem is now fixed in Git. Thank you for your report.
----------------------------------------------------------------------
Comment By: Jan Wagner (cyco_dd)
Date: 2009-12-05 21:48
Message:
41_check_ping_detect_args.dpatch worked for me, thanks
----------------------------------------------------------------------
Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-12-05 21:17
Message:
So as discusson on IRC your build process do not re-generate autoconf. This
is done automatically if you have the rigth software installed, but it may
be simpler to use the attached patches
Since I fixed a bunch of whitespaces the first patch may apply only if you
ignore whitespace mismatches - the 2nd may apply correctly
----------------------------------------------------------------------
Comment By: Jan Wagner (cyco_dd)
Date: 2009-12-05 15:36
Message:
I'm getting this twice, since configure is issueing "/bin/sh
./config.status --recheck". That should be unrelated to the issue.
The configure arguments are:
NP_LIBEXEC:=/usr/lib/nagios/plugins
./configure \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--libexecdir=${NP_LIBEXEC} \
--with-perl=/usr/bin/perl \
--with-openssl=/usr \
--with-pgsql=/usr \
--with-mysql=/usr \
--with-proc-loadavg=/proc/loadavg \
--with-ps-command="/bin/ps axwo 'stat uid pid ppid vsz rss
pcpu etime comm args'" \
--with-ps-format="%s %d %d %d %d %d %f %s %s %n" \
--with-ps-cols=10 \
--with-ps-varlist="procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos"
\
--with-ping-command="/bin/ping -n -c %d %s" \
--with-ping6-command="/bin/ping6 -n -c %d %s" \
--with-nslookup-command="/usr/bin/nslookup -sil" \
--with-uptime-command="/usr/bin/uptime" \
--with-rpcinfo-command="/usr/bin/rpcinfo" \
--with-smbclient-command="/usr/bin/smbclient" \
--with-snmpget-command="/usr/bin/snmpget" \
--with-snmpgetnext-command="/usr/bin/snmpgetnext" \
--with-qstat-command="/usr/bin/quakestat" \
--with-fping-command="/usr/bin/fping" \
--with-ssh-command="/usr/bin/ssh" \
--with-mailq-command="/usr/bin/mailq" \
--with-proc-meminfo="/proc/meminfo" \
--with-dig-command="/usr/bin/dig" \
--with-apt-get-command="/usr/bin/apt-get" \
--disable-rpath
Which fails with this at runtime. Working is installing inetutils-ping at
build time and dropping --with-ping* from configure.
With defined ping commands, in config.h I have:
#define PING6_COMMAND "/bin/ping6 -n -c %d %s"
#define PING6_PACKETS_FIRST 1
#define PING_COMMAND "/bin/ping -n -c %d %s"
#define PING_HAS_TIMEOUT 1
#define PING_PACKETS_FIRST 1
Anyways ... I get also with your latest patch:
# LANG=C /usr/lib/nagios/plugins/check_ping 127.0.0.1 -w 2,20% -c 5,30%
Segmentation fault
Without defining the ping commands and inetutils-ping installed, I get:
#define PING6_COMMAND "/bin/ping6 -n -c %d %s"
#define PING6_PACKETS_FIRST 1
#define PING_COMMAND "/bin/ping -n -c %d %s"
/* #undef PING_HAS_TIMEOUT */
#define PING_PACKETS_FIRST 1
# LANG=C /usr/lib/nagios/plugins/check_ping 127.0.0.1 -w 2,20% -c 5,30%
PING OK - Packet loss = 0%, RTA = 0.00
ms|rta=0.000000ms;2.000000;5.000000;0.000000 pl=0%;20;30;0
----------------------------------------------------------------------
Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-12-05 07:36
Message:
Nevermind - the output you sent is ok...
So are you really getting this twice (I don't, wondering if it may be
related to your issue)?
checking for ICMP ping syntax... (command-line) /bin/ping6 -n -c %d %s
checking for ICMPv6 ping syntax... (command-line) /bin/ping -n -c %d %s
Please check config.h and tell me what you have defined for:
- PING6_COMMAND
- PING6_PACKETS_FIRST
- PING_COMMAND
- PING_HAS_TIMEOUT
- PING_PACKETS_FIRST
Also I figured I should also change it for ping6, I'll attach an updated
patch.
----------------------------------------------------------------------
Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-12-05 06:03
Message:
I'll double check... So what are the configure arguments in both cases?
----------------------------------------------------------------------
Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-12-05 06:02
Message:
[ Proxying response from Jan... ]
When autodetecting with inetutils-ping installed on buildtime all works
fine
Defining the commands (like the once when autodetected) and inetutils-ping
having not installed when building gives me a segfault on runtime
inetutils-ping installed on buildtime/autodetect:
waja at packaging:~/debian-builds/nagios-plugins/trunk$ grep "ping syntax"
../build-area/nagios-plugins_1.4.14-1~pc4_i386.build
checking for ICMP ping syntax... /bin/ping -n -c %d %s
checking for ICMPv6 ping syntax... /bin/ping6 -n -c %d %s
checking for ICMP ping syntax... /bin/ping -n -c %d %s
checking for ICMPv6 ping syntax... /bin/ping6 -n -c %d %s
Exectution works fine.
inetutils-ping removed on buildtime/command defined:
waja at packaging:~/debian-builds/nagios-plugins/trunk$ grep "ping syntax"
../build-area/nagios-plugins_1.4.14-1_i386.build
checking for ICMP ping syntax... (command-line) /bin/ping -n -c %d %s
checking for ICMPv6 ping syntax... (command-line) /bin/ping6 -n -c %d %s
checking for ICMP ping syntax... (command-line) /bin/ping -n -c %d %s
checking for ICMPv6 ping syntax... (command-line) /bin/ping6 -n -c %d %s
packaging:~# LANG=C /usr/lib/nagios/plugins/check_ping 127.0.0.1 -w 2,20%
-c 5,30%
Segmentation fault
----------------------------------------------------------------------
Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-12-04 21:48
Message:
Gotchya. --with-ping[6]-command expected three arguments - two numeric and
one string. I try to detect it now (attached patch) - will go upstream it
it works for you...
----------------------------------------------------------------------
Comment By: Jan Wagner (cyco_dd)
Date: 2009-11-23 16:47
Message:
Unfortunately I have. :( Maybe you can have a look:
normal debian package - using iputils-ping and compile following flags:
--with-ping-command="/bin/ping -n -U -w %d -c %d %s" \
--with-ping6-command="/bin/ping6 -n -U -w %d -c %d %s" \
sid:~# /usr/lib/nagios/plugins/check_ping 127.0.0.1 -w 2,20% -c 5,30%
PING OK - Packet loss = 0%, RTA = 0.00 ms|
rta=0.000000ms;2.000000;5.000000;0.000000 pl=0%;20;30;0
Okay ... thats fine, like always.
----
pc1 - using iputils-ping and following compile flags:
--with-ping-command="/bin/ping -n -c %d %s" \
--with-ping6-command="/bin/ping6 -n -c %d %s" \
sid:/tmp# LANG=C /usr/lib/nagios/plugins/check_ping 127.0.0.1 -w 2,20% -c
5,30%
Speicherzugriffsfehler
Okay ... here are just the ping commands wrong
----
pc2 - using iputils-ping and without specific compile flags (iputils-ping
installed at compile time), but:
checking for ICMP ping syntax... /bin/ping -n -U -w %d -c %d %s
checking for ICMPv6 ping syntax... /bin/ping6 -n -U -w %d -c %d %s
sid:/tmp# LANG=C /usr/lib/nagios/plugins/check_ping 127.0.0.1 -w 2,20% -c
5,30%
PING OK - Packet loss = 0%, RTA = 0.00 ms|
rta=0.000000ms;2.000000;5.000000;0.000000 pl=0%;20;30;0
Thats also fine, the commands are autodetected.
----
pc3 - using inetutils-ping and without specific compile flags
(inetutils-ping
installed at compile time), but:
checking for ICMP ping syntax... /bin/ping -n -c %d %s
checking for ICMPv6 ping syntax... /bin/ping6 -n -c %d %s
sid:/tmp# LANG=C /usr/lib/nagios/plugins/check_ping 127.0.0.1 -w 2,20% -c
5,30%
PING OK - Packet loss = 0%, RTA = 0.00 ms|
rta=0.000000ms;2.000000;5.000000;0.000000 pl=0%;20;30;0
Looks great, command are autodetected and inetutils-ping works
----
pc4 - using inetutils-ping and the following compile flags (inetutils-ping
NOT installed at compile time):
--with-ping6-command="/bin/ping6 -n -c %d %s" \
--with-ping-command="/bin/ping -n -c %d %s" \
sid:/tmp# LANG=C /usr/lib/nagios/plugins/check_ping 127.0.0.1 -w 2,20% -c
5,30%
Speicherzugriffsfehler
This is the point I don't get. I'm using the same commands like the once
when
they where autodetected, but check_ping segfaults .... I'm missing
something?
Thanks for your help, Jan.
----------------------------------------------------------------------
Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-11-11 23:29
Message:
Normally configure decides which ping command and syntax to use, so it
really depend on which packages you have installed. You can force the
command to use with --with-ping-command=SYNTAX and
--with-ping6-command=SYNTAX.
An easy way to find the syntax it to look at a generated config.h when
only the wanted ping commands are available. Search for #define
PING_COMMAND and #define PING6_COMMAND.
Let me know if you have any problem with specific ping variants.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2896201&group_id=29880
More information about the Devel
mailing list