[ZBX-4882] Low level discovery: SNMP - quoted string values in SNMPVALUE 'break' filter matching Created: 2012 Apr 16  Updated: 2017 May 30  Resolved: 2012 Apr 17

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S), Templates (T)
Affects Version/s: 2.0.0rc1
Fix Version/s: 1.8.12rc2, 2.0.0rc3

Type: Incident report Priority: Major
Reporter: Tom Duijf (xs-) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: discovery, templates, usability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

low level discovery
SNMP


Issue Links:
Duplicate
duplicates ZBX-4793 SNMP item with dynamic indexes fail: ... Closed

 Description   
    1. Issue
      Low level discovery - SNMP
      e.g. Cisco (perhaps others also) return 'quoted' values when polling STRING values.
      This is highly frustrating / confusing when applying a discovery "filter"
    1. Example (zabbix_server.log - debug level):
      27170:20120416:120125.142 DBlld_process_discovery_rule() f_macro:' {#SNMPVALUE}' f_regexp:'^Fa.|^Gi.|^Tu.|^Vl.'
      27170:20120416:120125.144 In DBlld_check_record() jp_row:'{"{#SNMPINDEX}":1,"{#SNMPVALUE}

      ":"\"Fa0\/0\""}'
      27170:20120416:120125.145 In DBlld_check_record() jp_row:'

      Unknown macro: {"{#SNMPINDEX}":2,"{#SNMPVALUE}":"\"Fa0\/1\""}'
      27170:20120416:120125.146 In DBlld_check_record() jp_row:'{"{#SNMPINDEX}"}

      '
      27170:20120416:120125.146 In DBlld_check_record() jp_row:'{"

      {#SNMPINDEX}":5,"{#SNMPVALUE}":"\"Fa0\/0\/2\""}'
      27170:20120416:120125.147 In DBlld_check_record() jp_row:'{"{#SNMPINDEX}

      ":6,"

      {#SNMPVALUE}":"\"Fa0\/0\/3\""}'

      Regexp does not match fetched values.
      Used regexp (which is expected output): ^Fa.|^Gi.|^Tu.|^Vl.
      Regexp that actually works (but is unwanted): \"Fa.|\"Gi.|\"Tu.|\"Vl.

      ## Request / proposal
      Please, either:
      - strip leading / ending quotes from {#SNMPVALUE}

      when matching discovery against filter.

  • strip string quoting alltogether (if found), kind of useless, as this is just SNMP formatting.


 Comments   
Comment by richlv [ 2012 Apr 16 ]

ZBX-4793 might fix this one as well

Comment by Alexander Vladishev [ 2012 Apr 17 ]

Of course, it will be fixed with ZBX-4793.

Comment by Alexander Vladishev [ 2012 Apr 17 ]

Fixed in version pre-1.8.12 r26905 and pre-2.0.0rc3 r26919.

Generated at Sat Apr 20 08:09:37 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.