check_ping 2.2.1 bug?

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

check_ping 2.2.1 bug?

Postby jjani » Mon Oct 28, 2019 6:58 am

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
jjani
 
Posts: 4
Joined: Mon Oct 28, 2019 6:53 am

Re: check_ping 2.2.1 bug?

Postby mcapra » Mon Oct 28, 2019 1:55 pm

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?
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3584
Joined: Thu May 05, 2016 3:54 pm

Re: check_ping 2.2.1 bug?

Postby jjani » Tue Oct 29, 2019 3:58 am

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.
jjani
 
Posts: 4
Joined: Mon Oct 28, 2019 6:53 am

Re: check_ping 2.2.1 bug?

Postby mcapra » Tue Oct 29, 2019 11:01 am

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
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3584
Joined: Thu May 05, 2016 3:54 pm

Re: check_ping 2.2.1 bug?

Postby ssax » Tue Oct 29, 2019 3:49 pm

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
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 4339
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_ping 2.2.1 bug?

Postby jjani » Mon Nov 04, 2019 4:41 am

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
jjani
 
Posts: 4
Joined: Mon Oct 28, 2019 6:53 am

Re: check_ping 2.2.1 bug?

Postby scottwilkerson » Tue Nov 05, 2019 3:11 pm

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)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 16617
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: check_ping 2.2.1 bug?

Postby scottwilkerson » Tue Nov 05, 2019 3:15 pm

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/nagios-plugins/releases

Looks like there may be an overzealous RPM EPEL packager, OR you have a dev branch setup or something...
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 16617
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: check_ping 2.2.1 bug?

Postby jjani » Fri Nov 08, 2019 3:02 am

Finally, what is the conclusion?
I saw that there are some acknowledging from this "feature".
Is this a bug?
jjani
 
Posts: 4
Joined: Mon Oct 28, 2019 6:53 am

Re: check_ping 2.2.1 bug?

Postby scottwilkerson » Fri Nov 08, 2019 9:49 am

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 16617
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 21 guests