[ZBX-7511] Regression - Dynamic Index doesn't support white space at the end of the string to search for Created: 2013 Dec 09  Updated: 2017 May 30  Resolved: 2015 Oct 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 1.8.18
Fix Version/s: 2.2.11rc1, 2.4.7rc1, 3.0.0alpha3

Type: Incident report Priority: Major
Reporter: Jc Duss Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: snmpdynamicindex
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Debian squeeze and mysql zabbix 1.8.10 and zabbix 1.8.18



 Description   

In a multiple proxy and server envirronment, I discover that there was a regression for Dynamic index between version 1.8.10 (previous server version) and 1.8.18 of zabbix (new server version)

On Cisco 2960 here is the item I have to get the Switch temperature :
1.3.6.1.4.1.9.9.13.1.3.1.3["index","1.3.6.1.4.1.9.9.13.1.3.1.2","SW#1, Sensor#1, GREEN "]

Notice the space char at the end ot the "string to search for", this space is present on the result with an snmp walk.

On a monitored switch behind my zabbix server previously in 1.8.10 and a proxy in 1.8.10, this item is supported and retrieved successfully.

With a direct monitored switch from zabbix server 1.8.18, I get an unsupported item (truncated syslog report ):
item [sw2R9RA:Switch_Temperature] became not supported: cannot find index [1.3.6.1.4.1.9.9.13.1.3.1.2] of the OID [1.3.6.1.4.1.9.9.13.1.3.1.3["index","1.3.6.1.4.1.9.9.13.1.3.1.2","SW#1

While this item behind a proxy is still supported!

I suppose a trim as been added or something like this under zabbix 1.8.18 to suppress the last white space???

I tested different things without result :

  • protect the last space char with a slash
  • set a two consecutive space.

I don't know if this is present under version 2.x

for the moment my production envirronement is blocked in version 1.8



 Comments   
Comment by Jc Duss [ 2013 Dec 09 ]

I discovered the same behaviour if the space is at the begin of the "search for" with zabbix-server 1.8.18 :

1.3.6.1.4.1.9.9.13.1.5.1.2.1 = STRING: " Power Supply 1, PWR-2700-AC/4"

-> item unsupported for :
1.3.6.1.4.1.9.9.13.1.5.1.4["index","1.3.6.1.4.1.9.9.13.1.5.1.2"," Power Supply 1, PWR-2700-AC/4"]

This is on a cisco core switch C6200.

Can't test this item behind a 1.8.10 proxy

Comment by Jc Duss [ 2013 Dec 17 ]

Still present in 1.8.19.

Comment by Glebs Ivanovskis (Inactive) [ 2015 Sep 28 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-7511-22 r55800.

Removed SNMP string trimming which was introduced (for the reason no one can recall now) in pre-1.8.14 r27986, pre-2.0.1 r27988 and pre-2.1.0 (trunk) r27989 and wasn't documented anywhere.

Comment by Glebs Ivanovskis (Inactive) [ 2015 Sep 28 ]

I used Free SNMP Simulator to reproduce this issue. One can use .snmprec files to make whatever OID return whichever value, but unfortunately trailing spaces are trimmed by snmpsimd. To fix this problem get the sources and replace

            oid, tag, value = octs2str(line).strip().split('|', 2)

with

            oid, tag, value = octs2str(line)[:-1].split('|', 2)

in snmpsim/grammar/snmprec.py (this will trim just the newline character). Then install.

Comment by Andris Zeila [ 2015 Oct 01 ]

Successfully tested

Comment by Glebs Ivanovskis (Inactive) [ 2015 Oct 01 ]

Fixed in pre-2.2.11rc1 r55884.
Fixed in pre-2.4.7rc1 r55885.
Fixed in pre-3.0.0alpha3 (trunk) r55886.

Generated at Thu Apr 25 03:00:48 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.