View Full Version : Strange Values with large numbers
Just went from 1.1.2 to 1.1.4 and i ve got very stange things on counters with large numbers. I did log the values with as is type to see the evolution clearly.
it seems the varying (change part) is ok, but the total is completly wrong and then it is impossible to get correct values for delta type. I did clean all the values to start from zero but the results are the same.
Values taken from latest values screens
History Last value Change
IN <- LB001 20 Dec 14:56:00 196234857 +6358756
IN <- LB002 20 Dec 14:56:00 640337700 +13538767
OUT -> LB001 20 Dec 14:56:00 18446744072714120000 +74076160
OUT -> LB002 20 Dec 14:56:00 18446744072993925000 +105156608
IN <- LB001 20 Dec 14:58:01 222563715 +6864846
IN <- LB002 20 Dec 14:58:00 694430857 +14335084
OUT -> LB001 20 Dec 14:58:00 18446744073006980000 +78372864
OUT -> LB002 20 Dec 14:58:00 18446744073420745000 +109139968
IN <- LB001 20 Dec 14:59:30 242908145 +6385828
IN <- LB002 20 Dec 14:59:30 736970722 +14572810
OUT -> LB001 20 Dec 14:59:31 18446744073230615000 +71921664
OUT -> LB002 20 Dec 14:59:30 42834370 -18446744073598305000
As you see when the value get too high, the value is not changing properly and is dyplaying really wrong number (18446744073006980000, note the tailing zeros never changing and that number way too big).
Just tried the 1.1.2 beta front end and results are ok so going back to beta 1.1.2 front end and binaries.
Duno where is the problem but there is one ...
Does this problem exist for Delta-enabled items only?
Did some tests on my test system:
zabbix@ubuntu:~/zabbix$ snmpwalk -v1 -c public 192.168.1.60 .1.3.6.1.2.1.2.2.1.10.1
IF-MIB::ifInOctets.1 = Counter32: 18446744072294799576
Note that first part of the received value is exactly the same as you've got. What I do not understand is why Counter32 exceeds 2^32-1. Hmm... Any ideas?
hi Alexei, i did this test and got different results than you:
1. here are the snmpwalk tests using both v1 and v2c
box:~# snmpwalk -v1 -c public box2 1.3.6.1.2.1.2.2.1.16.3
IF-MIB::ifOutOctets.3 = Counter32: 3596807944
box:~# snmpwalk -v2c -c public box2 1.3.6.1.2.1.2.2.1.16.3
IF-MIB::ifOutOctets.3 = Counter32: 3608738442
2. but here is what is in the mysql database:
mysql> select snmp_oid, description, lastvalue, lastclock, prevvalue, value_type from items where itemid=17577;
+------------------------+--------------+----------------------+------------+----------------------+------------+
| snmp_oid | description | lastvalue | lastclock | prevvalue | value_type |
+------------------------+--------------+----------------------+------------+----------------------+------------+
| 1.3.6.1.2.1.2.2.1.16.3 | ifOutOctets3 | 18446744073079428681 | 1135912140 | 18446744073066808098 | 0 |
+------------------------+--------------+----------------------+------------+----------------------+------------+
1 row in set (0.00 sec)
3. i'm using the latest beta (fresh install) and debian sarge with the net-snmp daemon.
is there any test i can do to help you identify the problem?
thanks,
dp4
Please, add the following line (highlighted) to check_snmp.c:
...
zabbix_log( LOG_LEVEL_WARNING, "OID [%s] Type [%d] Value[" ZBX_FS_UI64 "]", item->snmp_oid, vars->type, (zbx_uint64_t)*vars->val.integer);
}
else if(vars->type == ASN_COUNTER64)
{
...
recompile and let me know what you see in zabbix_server.log file.
Hi,
i've got the same Problems with my new "zabbix-1.1beta4". When i try to get some data's from different switches, i receive such a data's ( 1844674407...).
It seems the same problem. And i got this only with great values, like in_octets and out_octets.
And an question, do you mean that we should change this file /poller/checks_snmp.c ?
cu
I don't believe it is something ZABBIX-specific. snmpwalk returns exactly the same large values. See my previous posts.
When i check this via snmpwalk, i recive the correct values. But with Zabbix it's wrong.
debian:/usr/src/zabbix# snmpwalk -c public -v 2c s10 1.3.6.1.2.1.2.2.1.10.10101
IF-MIB::ifInOctets.10101 = Counter32: 3824089673
I have compiled zabbix with :
ii libsnmp5 5.1.2-6.2 NET SNMP (Simple Network Management Protocol
ii libsnmp5-dev 5.1.2-6.2 NET SNMP (Simple Network Management Protocol
cu
I'm on 64bit Linux, perhaps this is the reason of the issue. Will do more testing today...
chocho63
06-01-2006, 12:54
I've got the same problem with 1.1beta5. I worked fine in 1.1beta2.
I can't find check_snmp.c because it's checks_snmp.c. I've compiled zabbix_server but the issue remains. Here is the zabbix_server.log contents :
021315:20060106:134630 OID [IF-MIB::ifOutErrors.2] Type [65] Value[1]
021315:20060106:134630 OID [IF-MIB::ifOutErrors.2] Type [65] Value[0]
021315:20060106:134630 OID [IF-MIB::ifInOctets.2] Type [65] Value[404193939]
021315:20060106:134630 OID [IF-MIB::ifInOctets.2] Type [65] Value[18446744071587915803]
021315:20060106:134630 OID [IF-MIB::ifInOctets.2] Type [65] Value[1629392389]
021315:20060106:134630 OID [IF-MIB::ifOutErrors.2] Type [65] Value[0]
021315:20060106:134630 OID [IF-MIB::ifInOctets.2] Type [65] Value[18446744071602597831]
021315:20060106:134630 OID [IF-MIB::ifInOctets.2] Type [65] Value[1093852726]
021315:20060106:134630 OID [IF-MIB::ifOutUcastPkts.3] Type [65] Value[18446744073491837763]
021315:20060106:134630 OID [IF-MIB::ifOutUcastPkts.2] Type [65] Value[190028629]
021315:20060106:134630 OID [IF-MIB::ifOutUcastPkts.2] Type [65] Value[1190243658]
021315:20060106:134630 OID [IF-MIB::ifOutUcastPkts.2] Type [65] Value[260511093]
021315:20060106:134630 OID [IF-MIB::ifOutUcastPkts.2] Type [65] Value[957272538]
I've tried to run zabbix_server beta 2 instead of beta 5 (the zabbix database and the frontend are still in beta 5).
The values are correct in Zabbix with frontend beta5 but graphs doesn't display.
The problem seems to be in zabbix_server code.
adr.rock
11-01-2006, 08:04
1.1beta2 - OK
1.1beta4 - bug
1.1beta5 - bug
All right. Thanks for the information, will try to do fresh install 1.1beta2 to see if it resolves the problem in my environment.
how can it not be zabbix specific? i have the similar problem many people are having. if it worked on beta3, doesn't work on beta5, and no router/switch changes have been made it has to be something in the code
glenn
Solution is here: http://www.zabbix.com/forum/showthread.php?t=1880
As I said earlier, both snmpwalk and ZABBIX returned huge incorrect numbers on my test system, that is why I came up with a theory that the problem is PROBABLY in SNMP libs.
Karkinjub Marakint
14-01-2006, 10:19
Solution is here: http://www.zabbix.com/forum/showthread.php?t=1880
As I said earlier, both snmpwalk and ZABBIX returned huge incorrect numbers on my test system, that is why I came up with a theory that the problem is PROBABLY in SNMP libs.
In src/zabbix_server/poller/checks_snmp.c at line 262 you have the following:
SET_UI64_RESULT(value, (zbx_uint64_t)*vars->val.integer);
According to snmp sources val.indeger is an int pointer not an unsigned long long pointer.
Not sure am I right or not but when I changed the casting to (uint32_t) for an ASN_COUNTER and to (int32_t) for ASN_INTEGER all the wrong SNMP values disappeared.
Before that I changed the zabbix_log to
zabbix_log( LOG_LEVEL_DEBUG, "OID [%s] Type [%d] Value[" ZBX_FS_UI64 "] Value32[%lu]",
item->snmp_oid, vars->type, (zbx_uint64_t)*vars->val.integer, (uint32_t)*vars->val.integer);
and it printed out the following:
001707:20060109:165416 OID [1.3.6.1.2.1.4.14.0] Type [65] Value[681] Value32[681]
001708:20060109:165416 OID [1.3.6.1.2.1.4.10.0] Type [65] Value[79694882] Value32[79694882]
001717:20060109:165416 OID [1.3.6.1.2.1.4.10.0] Type [65] Value[163054740] Value32[163054740]
001717:20060109:165416 OID [1.3.6.1.2.1.4.15.0] Type [65] Value[627] Value32[627]
001707:20060109:165416 OID [1.3.6.1.2.1.4.9.0] Type [65] Value[961750061] Value32[961750061]
001717:20060109:165416 OID [1.3.6.1.2.1.2.2.1.16.5] Type [65] Value[1128128730] Value32[1128128730]
001707:20060109:165417 OID [1.3.6.1.2.1.2.2.1.10.5] Type [65] Value[18446744071839231141] Value32[2424646821]
001713:20060109:165418 OID [1.3.6.1.2.1.4.17.0] Type [65] Value[0] Value32[0]
001710:20060109:165418 OID [1.3.6.1.2.1.4.19.0] Type [65] Value[0] Value32[0]
001710:20060109:165418 OID [1.3.6.1.2.1.4.4.0] Type [65] Value[0] Value32[0]
001713:20060109:165418 OID [.1.3.6.1.4.1.2021.13.15.1.1.6.1] Type [65] Value[78450308] Value32[78450308]
001710:20060109:165419 OID [1.3.6.1.2.1.2.2.1.10.4] Type [65] Value[138085058] Value32[138085058]
001713:20060109:165419 OID [1.3.6.1.2.1.2.2.1.10.5] Type [65] Value[18446744073006518326] Value32[3591934006]