ZABBIX BUGS AND ISSUES

icmppingloss simple check seems offset by -100%

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.1
  • Fix Version/s: 1.8.4
  • Component/s: None
  • Labels:
    None
  • Environment:
    Gentoo Linux
  • Zabbix ID:
    NA

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%.

Issue Links

Activity

Hide
Tais P. Hansen added a comment -

This was working correctly in 1.8 by the way.

Show
Tais P. Hansen added a comment - This was working correctly in 1.8 by the way.
Hide
richlv added a comment -

can't reproduce, works as expected here.
what does the last line look like from :
fping -p 200 -c 20 <some host>
on the zabbix server ?

Show
richlv added a comment - can't reproduce, works as expected here. what does the last line look like from : fping -p 200 -c 20 <some host> on the zabbix server ?
Hide
Tais P. Hansen added a comment -

a.b.c.d : xmt/rcv/%loss = 20/20/0%, min/avg/max = 0.83/1.88/8.50

Show
Tais P. Hansen added a comment - a.b.c.d : xmt/rcv/%loss = 20/20/0%, min/avg/max = 0.83/1.88/8.50
Hide
richlv added a comment -

grab item id from the url when configuring that item, then in the database :
select * from items where itemid='<that_itemid>' limit 10;

are values correct there or not ?

Show
richlv added a comment - grab item id from the url when configuring that item, then in the database : select * from items where itemid='<that_itemid>' limit 10; are values correct there or not ?
Hide
Tais P. Hansen added a comment -

mysql> select * from history as h where h.itemid = 33713 limit 10;
---------------------------

itemid clock value

---------------------------

33713 1265886502 -100.0000
33713 1265886629 -100.0000
33713 1265886696 -100.0000
33713 1265886772 -100.0000
33713 1265886838 -100.0000
33713 1265886963 -100.0000
33713 1265887078 -100.0000
33713 1265887194 -100.0000
33713 1265887326 -100.0000
33713 1265887458 -100.0000

---------------------------
10 rows in set (0.01 sec)

Show
Tais P. Hansen added a comment - mysql> select * from history as h where h.itemid = 33713 limit 10; ---------------------------
itemid clock value
---------------------------
33713 1265886502 -100.0000
33713 1265886629 -100.0000
33713 1265886696 -100.0000
33713 1265886772 -100.0000
33713 1265886838 -100.0000
33713 1265886963 -100.0000
33713 1265887078 -100.0000
33713 1265887194 -100.0000
33713 1265887326 -100.0000
33713 1265887458 -100.0000
--------------------------- 10 rows in set (0.01 sec)
Hide
Tais P. Hansen added a comment -

mysql> select * from items as i where i.itemid = 33713 limit 10;
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

itemid type snmp_community snmp_oid snmp_port hostid description key_ delay history trends lastvalue lastclock prevvalue status value_type trapper_hosts units multiplier delta prevorgvalue snmpv3_securityname snmpv3_securitylevel snmpv3_authpassphrase snmpv3_privpassphrase formula error lastlogsize logtimefmt templateid valuemapid delay_flex params ipmi_sensor data_type authtype username password publickey privatekey mtime

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

33713 3 public interfaces.ifTable.ifEntry.ifInOctets.1 161 10546 icmppingloss icmppingloss[,10,200] 60 90 365 -100.000000 1265892194 -100.000000 0 0   % 0 0 NULL   0     0.001   0   32853 0       0 0         0

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 row in set (0.00 sec)

Show
Tais P. Hansen added a comment - mysql> select * from items as i where i.itemid = 33713 limit 10; ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
itemid type snmp_community snmp_oid snmp_port hostid description key_ delay history trends lastvalue lastclock prevvalue status value_type trapper_hosts units multiplier delta prevorgvalue snmpv3_securityname snmpv3_securitylevel snmpv3_authpassphrase snmpv3_privpassphrase formula error lastlogsize logtimefmt templateid valuemapid delay_flex params ipmi_sensor data_type authtype username password publickey privatekey mtime
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
33713 3 public interfaces.ifTable.ifEntry.ifInOctets.1 161 10546 icmppingloss icmppingloss[,10,200] 60 90 365 -100.000000 1265892194 -100.000000 0 0   % 0 0 NULL   0     0.001   0   32853 0       0 0         0
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 row in set (0.00 sec)
Hide
richlv added a comment -

ergh, yes, the first one was what i had in mind - thanks for providing correct information despite incorrect instructions
do you have a chance to try svn head ? i don't see any changes for this part since 1.8.1, but just in case...

Show
richlv added a comment - ergh, yes, the first one was what i had in mind - thanks for providing correct information despite incorrect instructions do you have a chance to try svn head ? i don't see any changes for this part since 1.8.1, but just in case...
Hide
Tais P. Hansen added a comment -

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;
---------------------------

itemid clock value

---------------------------

22162 1265902582 -100.0000
22162 1265902642 -100.0000
22162 1265902702 -100.0000

---------------------------
3 rows in set (0.00 sec)

Show
Tais P. Hansen added a comment - 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; ---------------------------
itemid clock value
---------------------------
22162 1265902582 -100.0000
22162 1265902642 -100.0000
22162 1265902702 -100.0000
--------------------------- 3 rows in set (0.00 sec)
Hide
Tais P. Hansen added a comment - - edited

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.

Show
Tais P. Hansen added a comment - - edited 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.
Hide
richlv added a comment -

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.

Show
richlv added a comment - 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.
Hide
Dmitry Borovikov added a comment -

Thank You very much for the deep analysis of the issue. It really helped a lot!

Show
Dmitry Borovikov added a comment - Thank You very much for the deep analysis of the issue. It really helped a lot!
Hide
Dmitry Borovikov added a comment -

Issue ZBX-1876 will contain a necessary fix for this issue.

Show
Dmitry Borovikov added a comment - Issue ZBX-1876 will contain a necessary fix for this issue.
Hide
Dmitry Borovikov added a comment -

Dear Tais P. Hansen,

Thank you very much for reporting this issue. It will contain a fix in the linked one.
There is a workaround for you. Your "fping" can process both IPv4 and IPv6 addresses. Besides, you make SourceIP empty due to your network conditions, so Zabbix will ping both "fping" and "fping6". So, make "Fping6Location" parameter empty by adding "Fping6Location=". Then Zabbix will use only "FpingLocation".

But such behavior will be introduced in ZBX-1876.

Regards.

Show
Dmitry Borovikov added a comment - Dear Tais P. Hansen, Thank you very much for reporting this issue. It will contain a fix in the linked one. There is a workaround for you. Your "fping" can process both IPv4 and IPv6 addresses. Besides, you make SourceIP empty due to your network conditions, so Zabbix will ping both "fping" and "fping6". So, make "Fping6Location" parameter empty by adding "Fping6Location=". Then Zabbix will use only "FpingLocation". But such behavior will be introduced in ZBX-1876. Regards.
Hide
Tais P. Hansen added a comment -

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.

Show
Tais P. Hansen added a comment - 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.
Hide
Paulo Ferreira added a comment -

Hello, as requested by Richlv after discussion on IRC channel,
This problem seems to still exist in 1.8.3:

System Information:
CentOS 5.3 : Linux hercules.sim.local 2.6.18-128.2.1.el5.028stab064.4 #1 SMP Mon Jul 27 12:45:01 MSD 2009 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=hercules.sim.local
GATEWAY=10.0.0.1

Solution, as suggested by Richlv was to uncomment the Fping6Location option on the zabbix_server.conf and set to empty

  1. Fping6Location=/usr/sbin/fping6
    Fping6Location=
    This solved the problem (please note that renaming fping6 binary also solved the problem)

server was installed from yum repository (http://centos.karan.org/ - [kbs-CentOS-Testing])

Show
Paulo Ferreira added a comment - Hello, as requested by Richlv after discussion on IRC channel, This problem seems to still exist in 1.8.3: System Information: CentOS 5.3 : Linux hercules.sim.local 2.6.18-128.2.1.el5.028stab064.4 #1 SMP Mon Jul 27 12:45:01 MSD 2009 x86_64 x86_64 x86_64 GNU/Linux cat /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=yes HOSTNAME=hercules.sim.local GATEWAY=10.0.0.1 Solution, as suggested by Richlv was to uncomment the Fping6Location option on the zabbix_server.conf and set to empty
  1. Fping6Location=/usr/sbin/fping6 Fping6Location= This solved the problem (please note that renaming fping6 binary also solved the problem)
server was installed from yum repository (http://centos.karan.org/ - [kbs-CentOS-Testing])
Hide
richlv added a comment -

this was supposed to be fixed in 1.8.2, but apparently has regressed

Show
richlv added a comment - this was supposed to be fixed in 1.8.2, but apparently has regressed
Hide
Paulo Ferreira added a comment -

Sorry forgot to include zabbix_server version and rpm's installed
zabbix_server_mysql -V
Zabbix Server v1.8.3 (revision 13928) (16 August 2010)
Compilation time: Sep 22 2010 12:23:29

rpm -qa * zabbix*
zabbix-web-1.8.3-2.el5.kb
zabbix-server-1.8.3-2.el5.kb
zabbix-agent-1.8.3-2.el5.kb
zabbix-server-mysql-1.8.3-2.el5.kb
zabbix-1.8.3-2.el5.kb
zabbix-web-mysql-1.8.3-2.el5.kb

Show
Paulo Ferreira added a comment - Sorry forgot to include zabbix_server version and rpm's installed zabbix_server_mysql -V Zabbix Server v1.8.3 (revision 13928) (16 August 2010) Compilation time: Sep 22 2010 12:23:29 rpm -qa * zabbix* zabbix-web-1.8.3-2.el5.kb zabbix-server-1.8.3-2.el5.kb zabbix-agent-1.8.3-2.el5.kb zabbix-server-mysql-1.8.3-2.el5.kb zabbix-1.8.3-2.el5.kb zabbix-web-mysql-1.8.3-2.el5.kb
Hide
Aleksandrs Saveljevs added a comment -

Fixed in pre-1.8.4 in r16416.

Show
Aleksandrs Saveljevs added a comment - Fixed in pre-1.8.4 in r16416.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: