Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-4882

Low level discovery: SNMP - quoted string values in SNMPVALUE 'break' filter matching

XMLWordPrintable

        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.

            Unassigned Unassigned
            xs Tom Duijf (xs-)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: