[ZBX-5840] change returned value for "icmppingsec" in case if host is not available Created: 2012 Oct 16  Updated: 2020 Jun 29

Status: Confirmed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.0.3, 4.2.5
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Alex Samad Assignee: Zabbix Development Team
Resolution: Unresolved Votes: 1
Labels: icmpping, simplechecks
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

server - simple check


Attachments: PNG File image-2019-08-28-15-57-02-374.png    
Issue Links:
Duplicate

 Description   

Hi

i currently do 2 checks
1) icmppingsec to return ping times
2) icmping to test if host is up

I have found icmppingsec and trigger on nodata() to give me lots of false results. This I think is about the server not being able to process all the info and me using a proxy and the amount of time it take to get to server ... we are not large .. maybe 30-40 server and the rtt between proxy and server is only 100ms

it seems to be a bit of waste to do 2 test doing about the same thing. I was wondering if icmppingsec could be slightly changed to return a -1 if it fails. that way you can test last(#1) = -1



 Comments   
Comment by richlv [ 2012 Oct 16 ]

checking for =0 should do that.
does that solve this issue ?

Comment by Alex Samad [ 2012 Oct 16 ]

i was working to hard to find an alternative

Yes 0 would be fine, can I presume that there is not situation when it might return zero in valid scenario

Comment by Oleksii Zagorskyi [ 2012 Nov 12 ]

I've improved issue Summary, hope it's better now.

Comment by Oleksii Zagorskyi [ 2012 Nov 12 ]

I've moved this issue from ZBXNEXT project, I believe this should be considered as a bug.
I describe this in next comments.

Comment by Oleksii Zagorskyi [ 2012 Nov 12 ]

Some part of debuglog (icmp pinger only):

 16249:20121109:172933.465 In get_pinger_hosts()
 16249:20121109:172933.465 In DCconfig_get_poller_items() poller_type:3
 16249:20121109:172933.465 End of DCconfig_get_poller_items():3
 16249:20121109:172933.465 In substitute_key_macros() data:'icmppingsec'
 16249:20121109:172933.465 End of substitute_key_macros():SUCCEED data:'icmppingsec'
 16249:20121109:172933.465 In add_icmpping_item() addr:'10.20.0.226' count:3 interval:0 size:0 timeout:0
 16249:20121109:172933.465 End of add_icmpping_item()
 16249:20121109:172933.465 In substitute_key_macros() data:'icmppingloss'
 16249:20121109:172933.465 End of substitute_key_macros():SUCCEED data:'icmppingloss'
 16249:20121109:172933.465 In add_icmpping_item() addr:'10.20.0.226' count:3 interval:0 size:0 timeout:0
 16249:20121109:172933.465 End of add_icmpping_item()
 16249:20121109:172933.465 In substitute_key_macros() data:'icmppingloss'
 16249:20121109:172933.465 End of substitute_key_macros():SUCCEED data:'icmppingloss'
 16249:20121109:172933.465 In add_icmpping_item() addr:'10.20.0.17' count:3 interval:0 size:0 timeout:0
 16249:20121109:172933.465 End of add_icmpping_item()
 16249:20121109:172933.465 End of get_pinger_hosts():3
 16249:20121109:172933.465 In process_pinger_hosts()
 16249:20121109:172933.465 In add_pinger_host() addr:'10.20.0.17'
 16249:20121109:172933.465 End of add_pinger_host()
 16249:20121109:172933.465 In add_pinger_host() addr:'10.20.0.226'
 16249:20121109:172933.465 End of add_pinger_host()
 16249:20121109:172933.465 In add_pinger_host() addr:'10.20.0.226'
 16249:20121109:172933.465 In do_ping() hosts_count:2
 16249:20121109:172933.465 In process_ping() hosts_count:2
 16249:20121109:172933.466 /tmp/zabbix_server_16249.pinger
 16249:20121109:172933.466 10.20.0.17
 16249:20121109:172933.466 10.20.0.226
 16249:20121109:172933.466 /usr/bin/fping -q -C3 2>&1 </tmp/zabbix_server_16249.pinger;
 16249:20121109:172933.933 read line [ICMP Host Unreachable from 10.20.0.32 for ICMP Echo sent to 10.20.0.226]
 16249:20121109:172936.012 read line [10.20.0.17  : 0.21 0.25 0.25]
 16249:20121109:172936.012 read line [10.20.0.226 : - - -]
 16249:20121109:172936.013 End of process_ping()
 16249:20121109:172936.013 End of do_ping():SUCCEED
 16249:20121109:172936.013 In process_values()
 16249:20121109:172936.013 Host [10.20.0.17] cnt=3 rcv=3 min/max/avg=0.000210/0.000250/0.000237
 16249:20121109:172936.013 In process_value()
 16249:20121109:172936.013 End of process_value()
 16249:20121109:172936.013 Host [10.20.0.226] cnt=3 rcv=0 min/max/avg=0.000000/0.000000/0.000000
 16249:20121109:172936.013 In process_value()
 16249:20121109:172936.013 End of process_value()
 16249:20121109:172936.013 In process_value()
 16249:20121109:172936.013 End of process_value()
 16249:20121109:172936.013 End of process_values()
 16249:20121109:172936.013 End of process_pinger_hosts()
 16249:20121109:172936.013 icmp pinger #1 spent 2.548743 seconds while processing 3 items

As you can see the tool which we all "love" (fping) for an unavailable host returns "- - -" but zabbix later interprets this like "0.000000"

Is this logical ?
Are we "smarter" than fping ?
Why then we are using another approach (change to notsupported) for keys which cannot be received/measured/estimated ?

I believe instead of current behavior we should, variants (a - is better) :

a) return nothing if host is not available, as it is now for example with agent.ping
b) switch the item to notsupported

Issue reporter Alex suggested to return -1.
This could be nice but I see two issues in this case:

  • we do not use such approach currently, and such values can mislead as well.
  • scale of graphs can be "broken" because most time normal received values are small (milliseconds)

Added:
I assume that users usually suppose that this item cannot return 0 so they are using for example icmppingsec.avg(#3)>0.05 to detect a slow ping.
So if the key will return "-1" this will give false result, i.e. will NOT show a problem.

I assume that users usually suppose that icmppingsec will return nothing if it's not possible to get any data.

Comment by Oleksii Zagorskyi [ 2012 Nov 12 ]

I think if my suggestion will be accepted then such change could be included to major release only.

For now I've added to a "icmppingsec" comment "If host is not available (timeout reached), the item will return 0." on pages:

http://www.zabbix.com/documentation/1.8/manual/config/items#simple_checks
http://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/simple_checks
http://www.zabbix.com/documentation/2.2/manual/config/items/itemtypes/simple_checks

Comment by alex dekker [ 2018 Apr 17 ]

I think the Average value in the graph for icmppingsec should either be disabled or come with a health warning, because as it stands it is misleading

Comment by Vladislavs Boborikins (Inactive) [ 2019 Aug 28 ]

Hello,

Since this version of Zabbix is no longer supported, we've decided not to prioritize this bug for the near future and close the issue with "Won't fix" resolution.

Please let us know if this decision should be reconsidered.

Regards
Vladislavs

Comment by alex dekker [ 2019 Aug 28 ]

The issue is still present in 4.2.5, so I don't believe it should be closed.

I am not sure if the way forward is to create a new item that doesn't do this, or change the behaviour of icmppingsec, or add a flag to request the old behaviour, or ....

Comment by Vladislavs Sokurenko [ 2019 Aug 28 ]

Hello troffasky, can you please explain in more detail ? Do you think implementation of ZBX-7798 could help ?

Generated at Sat Apr 12 07:51:02 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.