Page 1 of 1

check_ping 2.2.1 bug?

Posted: Mon Oct 28, 2019 6:58 am
by jjani
Hi!

In version of check_ping 2.2.1 I tried modify these parameters lot of versions ("-w 100,5% -c 200,15% -4 -p 5 -t 30") when the target host is denied any ICMP packet by iptables, but haven't got performance data in response, except with "-p 1" parameter.
The answer was only:
CRITICAL - Plugin timed out
This command working perfectly in version 2.1.4 and 2.1.2.
The answer was:
PING CRITICAL - Packet loss = 100%|rta=200.000000ms;100.000000;200.000000;0.000000 pl=100%;5;15;0
Can you check it?
This is a bug or my error?

BR,
Janos Juhasz

Re: check_ping 2.2.1 bug?

Posted: Mon Oct 28, 2019 1:55 pm
by mcapra
Looks as though check_ping hasn't changed in quite a long time:
https://github.com/nagios-plugins/nagio ... eck_ping.c

Code: Select all

$ sha256sum nagios-plugins-2.1.2/plugins/check_ping.c
746f4127c14c75d43d918c19975d13372198321bcbc6897cf37fb54bac6f9dcd *nagios-plugins-2.1.2/plugins/check_ping.c
$ sha256sum nagios-plugins-2.2.1/plugins/check_ping.c
746f4127c14c75d43d918c19975d13372198321bcbc6897cf37fb54bac6f9dcd *nagios-plugins-2.2.1/plugins/check_ping.c
How did you perform the update of your nagios-plugins suite?

Re: check_ping 2.2.1 bug?

Posted: Tue Oct 29, 2019 3:58 am
by jjani
It's so weird!
At the first I installed it with yum!
yum install nagios-plugins-all -y
After downloaded the plugins from http://nagios-plugins.org/download/, and untar, compile it.
Finally I replaced the original check_ping file to the new command file.
With

Code: Select all

check_ping -V
command was checked the actual version.

Here is my checksum output:
/nagios-plugins-2.2.0/plugins
sha256sum 3d74bf05acf10a6b7630c3d5d1933ddb48db5594e33e69c0c908f4f709daf315 check_ping
/nagios-plugins-2.1.4/plugins
sha256sum 7d27dc06ae450558678ec31f74e538624d902857a221e0680c6ed03a91a3ff0d check_ping
Here is my plugins info:
yum info nagios-plugins-all
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

Installed Packages
Name : nagios-plugins-all
Arch : x86_64
Version : 2.2.2
Release : 2.20190926git1b8ad57.el7
Size : 0.0
Repo : installed
From repo : epel
Summary : Nagios Plugins - All plugins
URL : https://www.nagios-plugins.org/
License : GPLv2+
Description : This package provides all Nagios plugins.

Re: check_ping 2.2.1 bug?

Posted: Tue Oct 29, 2019 11:01 am
by mcapra
Granted I don't have access to the 2.1.4 RPM from EPEL, I'm not able to reproduce this using a separate 2.1.4 build against 2.2.1 in EPEL:

Code: Select all

# rpm -i nagios-plugins-2.1.4-3.el7.centos.x86_64.rpm
warning: nagios-plugins-2.1.4-3.el7.centos.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID ac25decd: NOKEY
# rpm -i nagios-plugins-ping-2.1.4-3.el7.centos.x86_64.rpm
warning: nagios-plugins-ping-2.1.4-3.el7.centos.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID ac25decd: NOKEY
# /usr/lib64/nagios/plugins/check_ping --version
check_ping v2.1.4 (nagios-plugins 2.1.4)
# /usr/lib64/nagios/plugins/check_ping 8.8.8.8 -w 100,5% -c 200,15% -4 -p 5 -t 30
PING OK - Packet loss = 0%, RTA = 11.69 ms|rta=11.687000ms;100.000000;200.000000;0.000000 pl=0%;5;15;0

...

# rpm -i nagios-plugins-2.2.2-2.20190926git1b8ad57.el7.x86_64.rpm
# rpm -i nagios-plugins-ping-2.2.2-2.20190926git1b8ad57.el7.x86_64.rpm.1
# /usr/lib64/nagios/plugins/check_ping --version
check_ping v2.2.1.git (nagios-plugins 2.2.1)
# /usr/lib64/nagios/plugins/check_ping 8.8.8.8 -w 100,5% -c 200,15% -4 -p 5 -t 30
PING OK - Packet loss = 0%, RTA = 12.19 ms|rta=12.186000ms;100.000000;200.000000;0.000000 pl=0%;5;15;0

Re: check_ping 2.2.1 bug?

Posted: Tue Oct 29, 2019 3:49 pm
by ssax
I am able to replicate this on my system as well:

Code: Select all

[root@xid ~]# /usr/local/nagios/libexec/check_ping -H 192.168.X.X -w 100,5% -c 200,15% -4 -p 5 -t 30
CRITICAL - Plugin timed out
[root@xid ~]# /usr/local/nagios/libexec/check_ping -H 192.168.X.X -w 100,5% -c 200,15% -4 -p 1 -t 30
PING CRITICAL - Packet loss = 100%|rta=200.000000ms;100.000000;200.000000;0.000000 pl=100%;5;15;0

Re: check_ping 2.2.1 bug?

Posted: Mon Nov 04, 2019 4:41 am
by jjani
You don't reproduce it because the google is reachable! :)
Test it again with unreachable host.
mcapra wrote:Granted I don't have access to the 2.1.4 RPM from EPEL, I'm not able to reproduce this using a separate 2.1.4 build against 2.2.1 in EPEL:

Code: Select all

# rpm -i nagios-plugins-2.1.4-3.el7.centos.x86_64.rpm
warning: nagios-plugins-2.1.4-3.el7.centos.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID ac25decd: NOKEY
# rpm -i nagios-plugins-ping-2.1.4-3.el7.centos.x86_64.rpm
warning: nagios-plugins-ping-2.1.4-3.el7.centos.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID ac25decd: NOKEY
# /usr/lib64/nagios/plugins/check_ping --version
check_ping v2.1.4 (nagios-plugins 2.1.4)
# /usr/lib64/nagios/plugins/check_ping 8.8.8.8 -w 100,5% -c 200,15% -4 -p 5 -t 30
PING OK - Packet loss = 0%, RTA = 11.69 ms|rta=11.687000ms;100.000000;200.000000;0.000000 pl=0%;5;15;0

...

# rpm -i nagios-plugins-2.2.2-2.20190926git1b8ad57.el7.x86_64.rpm
# rpm -i nagios-plugins-ping-2.2.2-2.20190926git1b8ad57.el7.x86_64.rpm.1
# /usr/lib64/nagios/plugins/check_ping --version
check_ping v2.2.1.git (nagios-plugins 2.2.1)
# /usr/lib64/nagios/plugins/check_ping 8.8.8.8 -w 100,5% -c 200,15% -4 -p 5 -t 30
PING OK - Packet loss = 0%, RTA = 12.19 ms|rta=12.186000ms;100.000000;200.000000;0.000000 pl=0%;5;15;0

Re: check_ping 2.2.1 bug?

Posted: Tue Nov 05, 2019 3:11 pm
by scottwilkerson
I'm seeing "Host Unreachable"

Code: Select all

[root@localhost nagiosxi]# /usr/local/nagios/libexec/check_ping -V
check_ping v2.2.1 (nagios-plugins 2.2.1)
[root@localhost nagiosxi]# /usr/local/nagios/libexec/check_ping -H 192.168.254.254 -w 100,5% -c 200,15% -4 -p 5 -t 30
CRITICAL - Host Unreachable (192.168.254.254)

Re: check_ping 2.2.1 bug?

Posted: Tue Nov 05, 2019 3:15 pm
by scottwilkerson
Wait a second.... I see you have
Version : 2.2.2
Release : 2.20190926git1b8ad57.el7
What is this?

Plugins 2.2.2 hasn't even been released yet?
https://github.com/nagios-plugins/nagio ... s/releases

Looks like there may be an overzealous RPM EPEL packager, OR you have a dev branch setup or something...

Re: check_ping 2.2.1 bug?

Posted: Fri Nov 08, 2019 3:02 am
by jjani
Finally, what is the conclusion?
I saw that there are some acknowledging from this "feature".
Is this a bug?

Re: check_ping 2.2.1 bug?

Posted: Fri Nov 08, 2019 9:49 am
by scottwilkerson
It appears that the RPM maintainer packaged the maintenance branch of nagios-plugins and accidentally labeled it 2.2.2

Much of this has been addressed and will be in the real 2.2.2 nagios-plugins release which should be out in a few weeks.

For now, the best I can recommend would be to downgrade the nagios-plugins RPM to 2.2.1