[ZBX-4793] SNMP item with dynamic indexes fail: "cannot find index..." Created: 2012 Mar 22 Updated: 2017 May 30 Resolved: 2014 Jun 10 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 1.8.11 |
Fix Version/s: | 1.8.12rc2, 1.8.14, 2.0.1rc1, 2.1.0 |
Type: | Incident report | Priority: | Major |
Reporter: | Robert Jerzak | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 5 |
Labels: | snmpdynamicindex | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() ![]() ![]() ![]() |
||||||||||||||||||||||||
Issue Links: |
|
Description |
I have SNMP items with dynamic indexes in Zabbix 1.8.10: SNMP OID: snmpwalk from zabbix machine: snmpwalk -v2c -c xxx vdx01 SNMPv2-SMI::enterprises.1588.2.1.1.1.1.22.1.5 Searching index is 7. snmpwalk -v2c -c xxx vdx01 SNMPv2-SMI::enterprises.1588.2.1.1.1.1.22.1.3.7 It is OK. But in Zabbix 1.8.11 error message is generated: 22053:20120322:175859.311 item [vdx02:fan.1] became not supported: cannot find index [SNMPv2-SMI::enterprises.1588.2.1.1.1.1.22.1.5] of the OID [SNMPv2-SMI::enterprises.1588.2.1.1.1.1.22.1.3["ind How to create valid SNMP item with dynamic index in Zabbix 1.8.11? |
Comments |
Comment by Alexander Vladishev [ 2012 Mar 23 ] |
Hi, Please change debug level to 4 in a configuration file and attach log between these lines: In get_value_snmp() key:'fan.2' oid:'SNMPv2-SMI::enterprises.1588.2.1.1.1.1.22.1.3"index","SNMPv2-SMI::enterprises.1588.2.1.1.1.1.22.1.5"," FAN #1"' |
Comment by Robert Jerzak [ 2012 Mar 23 ] |
Logs with function get_value_snmp |
Comment by Robert Jerzak [ 2012 Mar 26 ] |
The same behavior is in Zabbix 2.0.0rc2. |
Comment by Robert Jerzak [ 2012 Apr 12 ] |
Is there any chance to fix this issue any time soon? This issue is blocking our zabbix migration to version 1.8.11 and next to version 2.0. |
Comment by Attilla de Groot [ 2012 Apr 13 ] |
Seeing the same here with a new 1.8.11 install, but not on the upgraded one. So it seems to work for an upgraded host, but not for a new machine where I restored the backup from. This means that for our environment nearly all monitoring/checks will fail. 10872:20120413:150642.945 item [stub-nik-226.ams-ix.net:if[1/8,multicast,in]] became not supported: cannot find index [1.3.6.1.2.1.31.1.1.1.1] of the OID [1.3.6.1.4.1.1991.1.1.3.3.5.1.40["index","1.3.6.1.2.1.31.1.1.1.1","etherne |
Comment by Alexander Vladishev [ 2012 Apr 13 ] |
Confirmed in latest 1.8 r26847. |
Comment by Alexander Vladishev [ 2012 Apr 16 ] |
Fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-4793 |
Comment by richlv [ 2012 Apr 16 ] |
would this also fix |
Comment by richlv [ 2012 Apr 16 ] |
(1) if there were some changes to how zabbix handles quoted values, the resulting logic should be documented <dimir> It's a regression, so I guess nothing should be. <richlv> CLOSED then |
Comment by dimir [ 2012 Apr 17 ] |
Successfully tested. Please review my tiny change at r26893. <Sasha> CLOSED |
Comment by Alexander Vladishev [ 2012 Apr 17 ] |
Fixed in version pre-1.8.12 r26905. |
Comment by Alexander Vladishev [ 2012 Apr 17 ] |
Fixed in version pre-2.0.0rc3 r26919. |
Comment by Andrew Howell [ 2012 Apr 23 ] |
Could this still be broken for SNMPv3? I have pretty much the exact same problem under 2.0.0rc3. No issue for older hosts, but a new host I added 'cannot find index' attached debug 4 log file |
Comment by Andrew Howell [ 2012 Apr 23 ] |
Hmmm can't attach (because it's closed?), so I'll just paste in here. 32114:20120423:152602.289 In substitute_key_macros() data:'sunfire.fault.ps' |
Comment by Alexander Vladishev [ 2012 May 07 ] |
(2) REOPENED SNMP strings with a null character in Zabbix shows as hex. snmpwalk -v2c -c public <ip> ifDescr Zabbix: <Sasha> RESOLVED in dev branch svn://svn.zabbix.com/branches/dev/ZBX-4793 r27380. |
Comment by Alexander Vladishev [ 2012 May 07 ] |
Related issue: |
Comment by dimir [ 2012 May 21 ] |
Successfully tested. All strings should be handled properly now (no hex result). |
Comment by dimir [ 2012 May 24 ] |
(3) Non-ASCII strings are printed as Hex. They should be printed as text with non-ASCII characters as question marks. <dimir> Use net-snmp functionality (e. g. DISPLAY-HINT, RFC2579) in order to better recognize hex strings. The returned values should be now exactly the way snmpwalk returns them. Non-ASCII strings will be printed as text with question marks, before this change they were printed as HEX. RESOLVED in r27812 <Sasha> REOPENED Hex strings are not processed correctly <dimir> RESOLVED in r27903 <Sasha> CLOSED Please review my changes in r27957 <dimir> Thanks, great improvement changes! |
Comment by Alexander Vladishev [ 2012 Jun 01 ] |
Fixed in pre-1.8.14 r27986, pre-2.0.1 r27988 and pre-2.1.0 (beta) r27989 |
Comment by Grzegorz Grabowski [ 2012 Jun 06 ] |
Hi, My SNMP OID: IF-MIB::ifAdminStatus["index","IF-MIB::ifPhysAddress","0:15"]
Notice ! There is no "0" index.
So, in my opinion, i should get value "1" in my Item. But not. Error generated. As I noticed I haven't got a problem where the index starts from "0" value, where there is no "0" in index, (index starts from "1") I got this error. My log: Best Regards, |
Comment by Grzegorz Grabowski [ 2012 Jun 06 ] |
The same in 28090 Log: |
Comment by Grzegorz Grabowski [ 2012 Jun 07 ] |
Hi Best regards, |
Comment by Robert Jerzak [ 2012 Jun 29 ] |
In Zabbix 1.8.13 this item works ok but in Zabbix 1.8.14 issue seems to came back. The problem is exact as in the initial post: SNMP OID: SNMPv2-SMI::enterprises.1588.2.1.1.1.1.22.1.3"index","SNMPv2-SMI::enterprises.1588.2.1.1.1.1.22.1.5"," FAN #1" snmpwalk -v2c -c xxx vdx01 SNMPv2-SMI::enterprises.1588.2.1.1.1.1.22.1.5 snmpwalk -v2c -c xxx vdx01 SNMPv2-SMI::enterprises.1588.2.1.1.1.1.22.1.3.7 Zabbix log: |
Comment by Robert Jerzak [ 2012 Jun 29 ] |
The same behavior is in Zabbix 2.0.1rc2. |
Comment by Robert Jerzak [ 2012 Aug 20 ] |
There is fix version is 1.8.15rc1 but I tested 1.8.15 and the issue still occurs. |
Comment by Denis Kostousov [ 2012 Sep 01 ] |
I use zabbix 1.8.15 on scientific linux 6. My dynamic index: Some linux command for diagnostic:
The index value in this dynamic index is too long: "16.32.128.0.0.49.55.48.51.53.52.0.0.57.0.0.0.1". It may be a cause of the problem. |
Comment by Eric Gearhart [ 2012 Sep 20 ] |
I'm now finding this issue as well... my SNMPv3 dynamic indexes are broken with a "timeout" on links that have higher latency... it seems the lower latency links that I have are working fine. |
Comment by Robert Jerzak [ 2012 Sep 24 ] |
Is there any chance to fix this in 2.0 branch? I am stuck in 1.8.13 because of this bug and I cannot upgrade zabbix in any way I tested 2.0.3rc1 and this issue still occurs (there is info "Fix Version/s: 2.0.1rc1" but I think this is incorrect). |
Comment by Eric Gearhart [ 2012 Sep 25 ] |
Here's an example of a Wireshark of a non-working host (on the left) and a host where SNMP dynamic indexes work fine (see the 'Not working versus working' image above at the top) The two hosts are both Cisco 2925 routers, using SNMpv3, with the exact same version of IOS (IOS 15.1). Notice the 'get-next' requests from Zabbix, and the lack of response on the left... on the right, the get-next requests are all responded to with 'get-response' |
Comment by Eric Gearhart [ 2012 Sep 28 ] |
Today at work I wrote a python script that basically serves as an external check, that I've used to take the place of dynamic indexes. I flipped the items we have from SNMPv3 agent dynamic index items to external check, and I call my script with myscript.py[ {HOST.IP},ifInOctets,<Interface-description>] If anyone's interested in the script just let me know, maybe I'll post it on the wiki or something. The lack of dynamic indexes is killing us at work (we're paying customers now too... we're in the process of buying Zabbix gold support). |
Comment by Oleksii Zagorskyi [ 2012 Dec 12 ] |
Not very good that we changed values for "Fix Version/s" without any actual merges to code. Would be better to not do that. |
Comment by Gene Liverman [ 2013 Apr 25 ] |
I am having the same issue of not being able to do dynamic indexes on CentOS 6.4 with Zabbix 2.5 |
Comment by Eric Gearhart [ 2013 Apr 25 ] |
Gene - I assume you mean Zabbix 2.0.5 In Zabbix 2.2 (not out yet) there is a huge fix that should be pointed out more in my humble opinion... the original Zabbix code that takes advantage of net-snmp libraries wasn't include the option to set the SNMP timeout that the user supplies in zabbix_server.conf in the actual net-snmp library calls. This was killing us for some time at work until we figured out what was going on. In Zabbix 2.2 the net-snmp poller code has been updated to include the user specified SNMP timeout value. I don't know if that fixes SNMP dynamic indexes on higher latency links, but I'm thinking it will. |
Comment by Oleksii Zagorskyi [ 2014 Jun 10 ] |
Last time this issue has been reopened by Robert Jerzak complaining for: SNMP OID: SNMPv2-SMI::enterprises.1588.2.1.1.1.1.22.1.3"index","SNMPv2-SMI::enterprises.1588.2.1.1.1.1.22.1.5"," FAN #1" snmpwalk -v2c -c xxx vdx01 SNMPv2-SMI::enterprises.1588.2.1.1.1.1.22.1.5 SNMPv2-SMI::enterprises.1588.2.1.1.1.1.22.1.5.7 = STRING: " FAN #1" What we can see in output above? Yes, a leading space for searched value " FAN #1" I performed similar experiment on zabbix 2.2.3 # snmpget -v1 -c public 10.20.0.7 .1.3.6.1.2.1.31.1.1.1.18.2 IF-MIB::ifAlias.2 = STRING: FAN #2 # snmpget -v1 -c public 10.20.0.7 .1.3.6.1.2.1.31.1.1.1.18.2 -m: iso.3.6.1.2.1.31.1.1.1.18.2 = STRING: " FAN #2" you can see it in both outputs (in second case I loaded EMPTY mibs list, that's why the value is quoted <- this is internal libsnmp behavior) If I create simple "snmpget" item - the value will be stored in DB w/o the leading space. If I create item with dynamic OID with the space: .1.3.6.1.2.1.2.2.1.2["index",".1.3.6.1.2.1.31.1.1.1.18"," FAN #2"] then the item complains with error "Cannot find index of " FAN #2" in ".1.3.6.1.2.1.31.1.1.1.18"." When OID is without the space: .1.3.6.1.2.1.2.2.1.2["index",".1.3.6.1.2.1.31.1.1.1.18","FAN #2"] then it works correctly. So issue should be closed again. |
Comment by richlv [ 2014 Jun 10 ] |
hmm, i don't like us trimming spaces. what if snmp will give both " FAN #2" and "FAN #2" ? |
Comment by Oleksii Zagorskyi [ 2014 Jun 11 ] |
Rich, agree, reported as |