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

SNMP discovery parses snmpindex wrong (BIG IP)

    XMLWordPrintable

Details

    • Team C
    • Sprint 72 (Jan 2021), Sprint 73 (Feb 2021), Sprint 74 (Mar 2021), Sprint 75 (Apr 2021), Sprint 76 (May 2021), Sprint 77 (Jun 2021), Sprint 78 (Jul 2021), Sprint 79 (Aug 2021), Sprint 80 (Sep 2021), Sprint 81 (Oct 2021), Sprint 82 (Nov 2021), Sprint 83 (Dec 2021)
    • 2

    Description

      Steps to reproduce:

      1. This is based on discovery of cpu indexes on BIG IP servers.

      The problem is zabbix doesn't escape " properly when using oid.

      discovery[{#SNMPVALUE},1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1]

      We get the result

      [{
      	"{#SNMPINDEX}": "\".1",
      	"{#SNMPVALUE}": "1"
      }, {
      	"{#SNMPINDEX}": "\".2",
      	"{#SNMPVALUE}": "2"
      }, {
      	"{#SNMPINDEX}": "\".3",
      	"{#SNMPVALUE}": "3"
      }, {
      	"{#SNMPINDEX}": "\".4",
      	"{#SNMPVALUE}": "4"
      }, {
      	"{#SNMPINDEX}": "\".5",
      	"{#SNMPVALUE}": "5"
      }, {
      	"{#SNMPINDEX}": "\".6",
      	"{#SNMPVALUE}": "6"
      }, {
      	"{#SNMPINDEX}": "\".7",
      	"{#SNMPVALUE}": "7"
      }, {
      	"{#SNMPINDEX}": "\".8",
      	"{#SNMPVALUE}": "8"
      }, {
      	"{#SNMPINDEX}": "\".9",
      	"{#SNMPVALUE}": "9"
      }, {
      	"{#SNMPINDEX}": "\".10",
      	"{#SNMPVALUE}": "10"
      }, {
      	"{#SNMPINDEX}": "\".11",
      	"{#SNMPVALUE}": "11"
      }, {
      	"{#SNMPINDEX}": "\".12",
      	"{#SNMPVALUE}": "12"
      }, {
      	"{#SNMPINDEX}": "\".13",
      	"{#SNMPVALUE}": "13"
      }, {
      	"{#SNMPINDEX}": "\".14",
      	"{#SNMPVALUE}": "14"
      }, {
      	"{#SNMPINDEX}": "\".15",
      	"{#SNMPVALUE}": "15"
      }, {
      	"{#SNMPINDEX}": "\".16",
      	"{#SNMPVALUE}": "16"
      }, {
      	"{#SNMPINDEX}": "\".17",
      	"{#SNMPVALUE}": "17"
      }, {
      	"{#SNMPINDEX}": "\".18",
      	"{#SNMPVALUE}": "18"
      }, {
      	"{#SNMPINDEX}": "\".19",
      	"{#SNMPVALUE}": "19"
      }, {
      	"{#SNMPINDEX}": "\".20",
      	"{#SNMPVALUE}": "20"
      }]
      

      But if i scan this oid with snmp the results are as following.

      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.1 = INTEGER: 1
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.2 = INTEGER: 2
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.3 = INTEGER: 3
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.4 = INTEGER: 4
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.5 = INTEGER: 5
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.6 = INTEGER: 6
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.7 = INTEGER: 7
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.8 = INTEGER: 8
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.9 = INTEGER: 9
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.10 = INTEGER: 10
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.11 = INTEGER: 11
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.12 = INTEGER: 12
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.13 = INTEGER: 13
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.14 = INTEGER: 14
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.15 = INTEGER: 15
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.16 = INTEGER: 16
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.17 = INTEGER: 17
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.18 = INTEGER: 18
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.19 = INTEGER: 19
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.49.20 = INTEGER: 20
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.1 = INTEGER: 1
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.2 = INTEGER: 2
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.3 = INTEGER: 3
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.4 = INTEGER: 4
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.5 = INTEGER: 5
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.6 = INTEGER: 6
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.7 = INTEGER: 7
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.8 = INTEGER: 8
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.9 = INTEGER: 9
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.10 = INTEGER: 10
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.11 = INTEGER: 11
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.12 = INTEGER: 12
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.13 = INTEGER: 13
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.14 = INTEGER: 14
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.15 = INTEGER: 15
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.16 = INTEGER: 16
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.17 = INTEGER: 17
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.18 = INTEGER: 18
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.19 = INTEGER: 19
      .1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.50.20 = INTEGER: 20
      

      But if you walk the same tree using the mib names you can see where the " comes from

      snmpwalk -v2c -c xxxx xxxx.xxx.no F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex
      
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".1 = INTEGER: 1
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".2 = INTEGER: 2
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".3 = INTEGER: 3
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".4 = INTEGER: 4
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".5 = INTEGER: 5
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".6 = INTEGER: 6
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".7 = INTEGER: 7
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".8 = INTEGER: 8
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".9 = INTEGER: 9
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".10 = INTEGER: 10
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".11 = INTEGER: 11
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".12 = INTEGER: 12
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".13 = INTEGER: 13
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".14 = INTEGER: 14
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".15 = INTEGER: 15
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".16 = INTEGER: 16
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".17 = INTEGER: 17
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".18 = INTEGER: 18
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".19 = INTEGER: 19
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."1".20 = INTEGER: 20
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".1 = INTEGER: 1
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".2 = INTEGER: 2
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".3 = INTEGER: 3
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".4 = INTEGER: 4
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".5 = INTEGER: 5
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".6 = INTEGER: 6
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".7 = INTEGER: 7
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".8 = INTEGER: 8
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".9 = INTEGER: 9
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".10 = INTEGER: 10
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".11 = INTEGER: 11
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".12 = INTEGER: 12
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".13 = INTEGER: 13
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".14 = INTEGER: 14
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".15 = INTEGER: 15
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".16 = INTEGER: 16
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".17 = INTEGER: 17
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".18 = INTEGER: 18
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".19 = INTEGER: 19
      F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."2".20 = INTEGER: 20
      

      To workaround this problem in zabbix i can use the mib path and it works.
      Example

      discovery[{#SNMPVALUE},F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex]
      

      Results:

      [{
      	"{#SNMPINDEX}": "\"1\".1",
      	"{#SNMPVALUE}": "1"
      }, {
      	"{#SNMPINDEX}": "\"1\".2",
      	"{#SNMPVALUE}": "2"
      }, {
      	"{#SNMPINDEX}": "\"1\".3",
      	"{#SNMPVALUE}": "3"
      }, {
      	"{#SNMPINDEX}": "\"1\".4",
      	"{#SNMPVALUE}": "4"
      }, {
      	"{#SNMPINDEX}": "\"1\".5",
      	"{#SNMPVALUE}": "5"
      }, {
      	"{#SNMPINDEX}": "\"1\".6",
      	"{#SNMPVALUE}": "6"
      }, {
      	"{#SNMPINDEX}": "\"1\".7",
      	"{#SNMPVALUE}": "7"
      }, {
      	"{#SNMPINDEX}": "\"1\".8",
      	"{#SNMPVALUE}": "8"
      }, {
      	"{#SNMPINDEX}": "\"1\".9",
      	"{#SNMPVALUE}": "9"
      }, {
      	"{#SNMPINDEX}": "\"1\".10",
      	"{#SNMPVALUE}": "10"
      }, {
      	"{#SNMPINDEX}": "\"1\".11",
      	"{#SNMPVALUE}": "11"
      }, {
      	"{#SNMPINDEX}": "\"1\".12",

      Attachments

        1. arubaos-powerconnect.snmprec.gz
          29 kB
        2. debug_checks_snmp.patch
          4 kB
        3. discovery_rule.png
          discovery_rule.png
          108 kB
        4. discovery_rule2.png
          discovery_rule2.png
          109 kB
        5. item_prototype.png
          item_prototype.png
          107 kB
        6. item_prototype2.png
          item_prototype2.png
          109 kB
        7. zabbix_server.log.gz
          98 kB
        8. zabbix_server.log2.gz
          130 kB

        Activity

          People

            andris Andris Mednis
            agavrilovs Aleksandrs Petrovs-Gavrilovs
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: