[ZBX-1126] Incorrect type for net.if checks Created: 2009 Oct 21  Updated: 2017 May 30  Resolved: 2010 May 13

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 1.6.6
Fix Version/s: 1.8.3

Type: Incident report Priority: Major
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 7
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBX-2272 Type of received value is not suitabl... Closed
is duplicated by ZBX-1566 64bit from solaris machine are not st... Closed
is duplicated by ZBX-2328 Type of received value [2674135166093... Closed

 Description   

11991:20091021:104038 Item [c7proxy25:net.if.out[em0,bytes]] error: Type of received value [22890672986915.000000] is not suitable for value type [Numeric (float)]
11991:20091021:104042 Item [c7fl01.is74.ru:net.if.in[eth0,bytes]] error: Type of received value [417324563695209.000000] is not suitable for value type [Numeric (float)]
11991:20091021:104042 Item [ns3.is74.ru:net.if.in[eth0,bytes]] error: Type of received value [1027792344644.000000] is not suitable for value type [Numeric (float)]
11991:20091021:104042 Item [ns3.is74.ru:net.if.out[eth0,bytes]] error: Type of received value [1136415884523.000000] is not suitable for value type [Numeric (float)]
11991:20091021:104054 Item [c7ids01.is74.ru:net.if.in[eth1,bytes]] error: Type of received value [251076685457392.000000] is not suitable for value type [Numeric (float)]

Patch:
Index: src/libs/zbxsysinfo/sysinfo.c
===================================================================
— src/libs/zbxsysinfo/sysinfo.c (revision 8111)
+++ src/libs/zbxsysinfo/sysinfo.c (working copy)
@@ -539,8 +539,8 @@
{
#if defined(HAVE_POSTGRESQL) || defined(HAVE_ORACLE) || defined(HAVE_SQLITE3)
/* field with precision 16, scale 4 [NUMERIC(16,4)] */

  • register double pg_min_numeric = (double)-1E12;
  • register double pg_max_numeric = (double)1E12;
    + register double pg_min_numeric = (double)-1E16;
    + register double pg_max_numeric = (double)1E16;

if (value <= pg_min_numeric || value >= pg_max_numeric)
return FAIL;



 Comments   
Comment by Nenad Opsenica [ 2010 Mar 17 ]

It is not related only to Postgresql and Oracle backends, it happens also when using MySQL:

1115:20100317:113009.124 Item [XXXXXXXXX:qosclass[htb,1:80]] error: Type of received value [6429844969204] is not suitable for value type [Numeric (float)]

This error happens very often when monitoring long-running hosts, therefore it makes Zabbix almost unusable

This behaviour is observer with zabbix svn10833

Comment by Alixen [ 2010 Apr 20 ]

This bug is still present in 1.8.2.
See my commenst on dublicate https://support.zabbix.com/browse/ZBX-2272

Alixen

Comment by Ben Mesman [ 2010 Apr 22 ]

The problem with 1.8.2 is actually slightly different. For mysql users the code was working, but because of this patch, it is now also broken for mysql users:

— zabbix-1.8.1/src/libs/zbxsysinfo/sysinfo.c 2010-01-27 22:22:44.000000000 +0100
+++ zabbix-1.8.2/src/libs/zbxsysinfo/sysinfo.c 2010-03-29 19:22:44.000000000 +0200
@@ -550,14 +563,13 @@

static int DBchk_double(double value)

{ -#if defined(HAVE_POSTGRESQL) || defined(HAVE_ORACLE) || defined(HAVE_SQLITE3) /* field with precision 16, scale 4 [NUMERIC(16,4)] */ register double pg_min_numeric = (double)-1E12; register double pg_max_numeric = (double)1E12; if (value <= pg_min_numeric || value >= pg_max_numeric) return FAIL; -#endif + return SUCCEED; }

I don't know why this was changed, but for mysql users, this needs to be reverted for 1.8.3, to fix the regression.

To fix the problem once and for all, we need to change the handling of these parameters, because the value used here will not be stored in the database, so there is no need to do a DBchk_double() on the value from the agent (which is really a uint64).

Comment by azurIt [ 2010 May 04 ]

Please vote for this bug, it's NOT scheduled for 1.8.3 !

Comment by Roberto Yokota [ 2010 May 14 ]

7625:20100514:012926.416 Item [XXXXXX:net.if.in[eth0,bytes]] error: Type of received value [4745925192315] is not suitable for value type [Numeric (float)]
7626:20100514:012927.245 Item [XXXXXX:net.if.in[eth1,bytes]] error: Type of received value [4947668199457] is not suitable for value type [Numeric (float)]
7628:20100514:012929.515 Item [XXXXXX:net.if.out[eth0,bytes]] error: Type of received value [11868478815505] is not suitable for value type [Numeric (float)]
7624:20100514:012930.221 Item [XXXXXX:net.if.out[eth1,bytes]] error: Type of received value [2193986318956] is not suitable for value type [Numeric (float)]

I having the same problem. Tested with versions 1.8.2 stable, 1.8.3.x-11982, 1.9.x-11982.
I'm using mysql.

Please open.

Roberto Yokota

Comment by Alexander Vladishev [ 2010 May 14 ]

Fixed in ver. pre1.8.3, r11998

Comment by Roberto Yokota [ 2010 May 14 ]

Thanks !

100% tested pre1.8.3, r11998 !!!

Regards,
Yokota

Comment by Alex Vorona [ 2011 Mar 31 ]

Hello,

1E12 still in 1.8.4 ?

/tmp/zabbix-1.8.4/src$ grep -R 1E12 *
libs/zbxdbcache/dbcache.c: register double pg_min_numeric = (double)-1E12;
libs/zbxdbcache/dbcache.c: register double pg_max_numeric = (double)1E12;

Thanks,
Alex

Comment by Aleksandrs Saveljevs [ 2011 Mar 31 ]

Yes, 10^12 is the maximum absolute value for "Numeric (float)" items that can be stored.

Comment by Alex Vorona [ 2011 Mar 31 ]

Hello,

For PostgreSQL NUMERIC(16,4) is used, so it can store 10^16. For MySQL double (16,4) is used, but it can store only 10^12. For Oracle number(20,4) is used. So maybe there will be better to use NUMERIC(16,4) for MySQL and raise limit to 10^16 ? Or use in MySQL double (12,4), like it really works.

Thanks,
Alex

Comment by Alex Vorona [ 2011 Mar 31 ]

Hello,

>Or use in MySQL double (12,4), like it really works.
Please ignore this.

Thanks,
Alex

Comment by Alex Vorona [ 2011 Mar 31 ]

Well, my mistake, PostgreSQL NUMERIC(16,4) will store 10^12 anyway, like double (16,4) in MySQL. But why in Oracle NUMBER (20,4) is used instead of NUMBER(16,4) ?

Thanks,
Alex

Comment by Aleksandrs Saveljevs [ 2011 Mar 31 ]

I got an answer that it just historically happened so. Perhaps, you could create a ZBXNEXT if 10^12 is too low for floating-point values for you.

Generated at Sat Apr 27 07:38:22 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.