[Nagiosplug-devel] [ nagiosplug-Bugs-2896201 ] check_ping depends on iputils-ping

SourceForge.net noreply at sourceforge.net
Sat Dec 5 15:36:00 CET 2009


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: 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