[ZBX-18365] Zabbix 5.0.2 incorrectly processing output of fping v5 Created: 2020 Sep 12  Updated: 2025 Jan 14  Resolved: 2020 Oct 04

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 5.0.2
Fix Version/s: 4.0.26rc1, 5.0.5rc1, 5.2.0beta2, 5.2 (plan)

Type: Problem report Priority: Trivial
Reporter: Florian Gattermeier Assignee: dimir
Resolution: Fixed Votes: 1
Labels: icmpping, ping
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OpenSUSE Leap 15.2 (5.3.18-lp152.41-default)


Attachments: PNG File Screenshot 2020-09-13 at 15.36.01.png     PNG File response time.png    
Issue Links:
Duplicate
Sub-task
part of ZBX-17848 Fix fping interval detection and conf... Closed
Team: Team I
Sprint: Sprint 68 (Sep 2020), Sprint 69 (Oct 2020)
Story Points: 2

 Description   

We are running a Zabbix Server (5.0.2) in an OpenSUSE Leap 15.2 VM. The Zabbix server is installed from this repository. The version of fping that is coming with the Zabbix installation from this repository is 5.0. It seems that the Zabbix server is not properly handling the output of fping 5.0 since hosts are showing as always up (with response time of 0 ms) in Zabbix. As soon as we downgraded fping to version 4.0, everything is working as expected.

 

Steps to reproduce:

  1. Create a host with IPv4 address
  2. Link Template "Template Module ICMP Ping"
  3. Make host unavailable by ICMP ping
  4. Look into the reported data

Result:

Host is always up even if the host is down or even not existent. Furthermore, the response time is shown as 0 ms for these hosts.

 

Expected:
Host should be unavailable by ICMP ping.

 

Below you can find the output of fping 4.0 and fping 5.0 of the following situations:

  1. fping version
  2. Existing host in the same subnet
  3. Non-existing host inside the same subnet
  4. Existing host outside of the same subnet
  5. Non-existing host outside of the same subnet
zabbix1:~ # fping --version
fping: Version 4.0
fping: comments to [email protected]

// Existing host (same subnet)
zabbix1:~ # /usr/sbin/fping -C3 -i1 192.168.42.1
192.168.42.1 : [0], 84 bytes, 0.38 ms (0.38 avg, 0% loss)
192.168.42.1 : [1], 84 bytes, 0.36 ms (0.37 avg, 0% loss)
192.168.42.1 : [2], 84 bytes, 0.39 ms (0.37 avg, 0% loss)
192.168.42.1 : 0.38 0.36 0.39

// Non-existing host (same subnet)
zabbix1:~ # /usr/sbin/fping -C3 -i1 192.168.42.2
192.168.42.2 : - - -

// Existing host (outside subnet)
zabbix1:~ # /usr/sbin/fping -C3 -i1 8.8.8.8
8.8.8.8 : [0], 84 bytes, 12.3 ms (12.3 avg, 0% loss)
8.8.8.8 : [1], 84 bytes, 12.4 ms (12.3 avg, 0% loss)
8.8.8.8 : [2], 84 bytes, 12.5 ms (12.4 avg, 0% loss)
8.8.8.8 : 12.34 12.43 12.51

// Non-existing host (outside subnet)
zabbix1:~ # /usr/sbin/fping -C3 -i1 7.7.7.7
7.7.7.7 : - - -

 

zabbix1:~ # fping --version
fping: Version 5.0

// Existing (same subnet)
zabbix1:~ # /usr/sbin/fping -C3 -i1 192.168.42.1
192.168.42.1 : [0], 64 bytes, 0.422 ms (0.422 avg, 0% loss)
192.168.42.1 : [1], 64 bytes, 0.436 ms (0.429 avg, 0% loss)
192.168.42.1 : [2], 64 bytes, 0.342 ms (0.400 avg, 0% loss)
192.168.42.1 : 0.422 0.436 0.342

// Non-existing (same subnet)
zabbix1:~ # /usr/sbin/fping -C3 -i1 192.168.42.2
192.168.42.2 : [0], timed out (NaN avg, 100% loss)
192.168.42.2 : [1], timed out (NaN avg, 100% loss)
192.168.42.2 : [2], timed out (NaN avg, 100% loss)
192.168.42.2 : - - -

// Existing (outside subnet)
zabbix1:~ # /usr/sbin/fping -C3 -i1 8.8.8.8
8.8.8.8 : [0], 64 bytes, 12.5 ms (12.5 avg, 0% loss)
8.8.8.8 : [1], 64 bytes, 12.5 ms (12.5 avg, 0% loss)
8.8.8.8 : [2], 64 bytes, 12.5 ms (12.5 avg, 0% loss)
8.8.8.8 : 12.5 12.5 12.5

// Non-existing (outside subnet)
zabbix1:~ # /usr/sbin/fping -C3 -i1 7.7.7.7
7.7.7.7 : [0], timed out (NaN avg, 100% loss)
7.7.7.7 : [1], timed out (NaN avg, 100% loss)
7.7.7.7 : [2], timed out (NaN avg, 100% loss)
7.7.7.7 : - - -

Attached you can find a screenshot showing the drop of response time from the realistic value (about 30 ms) to 0 ms.



 Comments   
Comment by Florian Gattermeier [ 2020 Sep 12 ]

Changelog of fping 5.0: https://github.com/schweikert/fping/releases/tag/v5.0

Comment by dimir [ 2020 Sep 13 ]

Indeed Zabbix is not ready for output changes introduced in fping 5.0:

Comment by dimir [ 2020 Sep 22 ]

Fixed in development branch feature/ZBX-18365-4.0, link to PR.

Comment by Michael Veksler [ 2020 Sep 23 ]

(1) new fping5 from src doesn't have required permission out of the box.

"sudo make install" does not :

sudo setcap cap_net_raw+ep ./fping-5.0/dist/sbin/fping

or

sudo chmod u+s ./fping-5.0/dist/sbin/fping 

At the result, we will receive misleading error in the log

 18288:20200923:150702.339 Cannot detect the minimum interval of ZBX-18365-4.0/fping-5.0/dist/sbin/fping 

Please, do support this case.

For example, put the fping output in error text:

./fping-5.0/src/fping: can't create socket (must run as root?)

<dimir> Improved error message when can't detect interval in 7efca03d73

RESOLVED

MVekslers CLOSED

Comment by dimir [ 2020 Oct 02 ]

Fixed in

Fping 5.0 changed the behavior to output also individual failed ping attempts, which was adapted here. This change only affects checks when target is down. Before this change, when using Fping >= 5.0 unavailable targets were reported as available.

Generated at Wed May 14 08:06:19 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.