[ZBX-1985] icmppingloss simple check seems offset by -100% Created: 2010 Feb 11 Updated: 2017 May 30 Resolved: 2010 Dec 27 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | None |
Affects Version/s: | 1.8.1 |
Fix Version/s: | 1.8.4 |
Type: | Incident report | Priority: | Major |
Reporter: | Tais P. Hansen | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Gentoo Linux |
Issue Links: |
|
Description |
I have several simple check type items using keyt "icmppingloss[,10,200]". Type of info is set to numeric (float) and units to %. No multiplier. Values logged seems to be offset by -100% meaning that no loss is logged as -100% and all loss is 0%. |
Comments |
Comment by Tais P. Hansen [ 2010 Feb 11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This was working correctly in 1.8 by the way. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by richlv [ 2010 Feb 11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
can't reproduce, works as expected here. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Tais P. Hansen [ 2010 Feb 11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
a.b.c.d : xmt/rcv/%loss = 20/20/0%, min/avg/max = 0.83/1.88/8.50 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by richlv [ 2010 Feb 11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
grab item id from the url when configuring that item, then in the database : are values correct there or not ? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Tais P. Hansen [ 2010 Feb 11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mysql> select * from history as h where h.itemid = 33713 limit 10;
-------
------- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Tais P. Hansen [ 2010 Feb 11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mysql> select * from items as i where i.itemid = 33713 limit 10;
-------
------- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by richlv [ 2010 Feb 11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ergh, yes, the first one was what i had in mind - thanks for providing correct information despite incorrect instructions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Tais P. Hansen [ 2010 Feb 11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Took a while but I created a completely clean install on my local workstation using zabbix from svn head (r10101). I added a single host with a single item - icmppingloss. I still get the same result: mysql> select * from history as h where h.itemid = 22162 limit 10;
-------
------- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Tais P. Hansen [ 2010 Feb 11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I've figured out the problem but I'm not sure why Zabbix is doing what it is doing so I can't give you a patch. Anyway, here's the story: If Zabbix is compiled with IPv6 support it expects CONFIG_FPING6_LOCATION to be set or it won't ping at all. On Gentoo fping6 doesn't exist because fping contains the necessary patches for handling IPv6 addresses and as of v1.8.1 Gentoo enables the IPv6 useflag. To get pings working I had to point FPING6 to /usr/sbin/fping. Next, Zabbix checks if CONFIG_SOURCE_IP is set, which it is not in my case (because I have multiple ip addresses to reach different networks). That means it'll fallback to run BOTH the fping and fping6 commands (line 93 in libs/zbxicmpping/icmpping.c "%s %s 2>&1 <%s;%s %s 2>&1 <%s") against the host effectively creating twice as many pings as requested (host->rcv is twice the items[i].count requested). This again screws up the "value_dbl = 100 * (1 - (double)hosts[h].rcv / (double)items[i].count);" calculation in pinger.c causing it to say x = 100 * (1 - 20 / 10) which gives -100. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by richlv [ 2010 Feb 12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
thanks for the analysis, that should help a lot. issues related to fping/fping6 existence are being currently looked at, maybe this problem can be solved with that. as for gentoo, are you installing from source or from gentoo data ? if the latter, it might be worth reporting a problem downstream so that gentoo would modify fping6 location. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Dmitry Borovikov [ 2010 Feb 12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Thank You very much for the deep analysis of the issue. It really helped a lot! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Dmitry Borovikov [ 2010 Feb 12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Issue | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Dmitry Borovikov [ 2010 Feb 12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Dear Tais P. Hansen, Thank you very much for reporting this issue. It will contain a fix in the linked one. But such behavior will be introduced in Regards. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Tais P. Hansen [ 2010 Feb 12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Thank you. I removed ipv6 support from zabbix to work around my problem for now. We're not currently monitoring ipv6 hosts anyway so it's no loss. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Paulo Ferreira [ 2010 Oct 27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hello, as requested by Richlv after discussion on IRC channel, System Information: cat /etc/sysconfig/network Solution, as suggested by Richlv was to uncomment the Fping6Location option on the zabbix_server.conf and set to empty
server was installed from yum repository (http://centos.karan.org/ - [kbs-CentOS-Testing]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by richlv [ 2010 Oct 27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
this was supposed to be fixed in 1.8.2, but apparently has regressed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Paulo Ferreira [ 2010 Oct 27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sorry forgot to include zabbix_server version and rpm's installed rpm -qa * zabbix* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Aleksandrs Saveljevs [ 2010 Dec 27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Fixed in pre-1.8.4 in r16416. |