Ad Widget

Collapse

snmp_parse_oid(): cannot parse OID

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • somnambulant
    Junior Member
    • Mar 2015
    • 3

    #1

    snmp_parse_oid(): cannot parse OID

    Hi,

    I'm seeing this for several SNMP items:

    snmp_parse_oid(): cannot parse OID ".1.3.6.1.4.1.3530.8.7.15.90.15.1.14.1.40.17219975 9".

    As others have stated in previous posts, I can snmpget that OID and return a value without error. So what's going on with snmp_parse_oid() that it's not OK with this value?



    Zabbix 2.2.4, net-snmp 5.7.3, rhel 2.6.32-358.14.1.el6.x86_64
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Originally posted by somnambulant
    Hi,

    I'm seeing this for several SNMP items:

    snmp_parse_oid(): cannot parse OID ".1.3.6.1.4.1.3530.8.7.15.90.15.1.14.1.40.17219975 9".

    As others have stated in previous posts, I can snmpget that OID and return a value without error. So what's going on with snmp_parse_oid() that it's not OK with this value?

    Zabbix 2.2.4, net-snmp 5.7.3, rhel 2.6.32-358.14.1.el6.x86_64
    Try to query the same OID using snmpget or snmpwalk commands.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • somnambulant
      Junior Member
      • Mar 2015
      • 3

      #3
      Yes, snmpget returns a result:

      snmpget -v2c -cpublic <hostname> .1.3.6.1.4.1.3530.8.7.15.90.15.1.14.1.40.172199759

      SNMPv2-SMI::enterprises.3530.8.7.15.90.15.1.14.1.40.17219 9759 = INTEGER: 3

      Comment

      • somnambulant
        Junior Member
        • Mar 2015
        • 3

        #4
        I think I'm a bit closer now...

        I didn't have the related mib in the .../share/snmp/mibs folder. Now that I have that there, OID error shows as:

        "<hostname>:dispatcherDatabaseConnConnectionStatsT ableConnected[763088334]" became not supported: snmp_parse_oid(): cannot parse OID "BES-EC-MIB-SMIV2::dispatcherDatabaseConnConnectionStatsTableC onnected.1.1.763088334".

        Using that OID with snmpget, I now have an error to go on:

        snmpget -v2c -cpublic <hostname> BES-EC-MIB-SMIV2::dispatcherDatabaseConnConnectionStatsTableC onnected.1.1.763088334

        BES-EC-MIB-SMIV2::dispatcherDatabaseConnConnectionStatsTableC onnected.1.1.763088334: Unknown Object Identifier (Index out of range: 763088334 (dispatcherDatabaseConnBaseConfigTableConnectionID ))

        Now, if I run snmpget with the -Ir switch, i get a result:

        snmpget -v2c -cpublic -Ir <hostname> BES-EC-MIB-SMIV2::dispatcherDatabaseConnConnectionStatsTableC onnected.1.1.763088334

        BES-EC-MIB-SMIV2::dispatcherDatabaseConnConnectionStatsTableC onnected.1.1.763088334 = INTEGER: 1

        Assuming that the snmp_parse_oid() method is calling snmpget, Is there a way for it to pass the -Ir switch?

        Comment

        • kloczek
          Senior Member
          • Jun 2006
          • 1771

          #5
          According what you wrote you are using Zabbix 2.2.4.
          I'm not 100% sure but looks like your issue is already solved in >=2.2.5

          If not just open a case on support.zabbix com attaching exact output of snmpget command (with OID name, OID data type and value).
          http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
          https://kloczek.wordpress.com/
          zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
          My zabbix templates https://github.com/kloczek/zabbix-templates

          Comment

          • sandis.neilands
            Junior Member
            • Jul 2015
            • 3

            #6
            Hello,

            Zabbix uses net-SNMP library internally. It doesn't call command line SNMP programs directly.

            System-wide SNMP parameters are set in /etc/snmp.conf. See man snmp.conf for details. In particular look up section MIB HANDLING.

            For setting equivalent of -Ir flag see noRangeCheck directive.

            http://linux.die.net/man/5/snmp.conf

            BR,
            Sandis

            Comment

            • kloczek
              Senior Member
              • Jun 2006
              • 1771

              #7
              Originally posted by sandis.neilands
              Hello,

              Zabbix uses net-SNMP library internally. It doesn't call command line SNMP programs directly.
              Yep and in the same time snmpget used the same library which is using zabbix so verification using snmpget usually make sense.

              PS. zabbix dev team is on process to release 2.2.10. After 2.2.4 has been fixed several SNMP related issues (if you really must use 2.2 zabbix)
              http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
              https://kloczek.wordpress.com/
              zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
              My zabbix templates https://github.com/kloczek/zabbix-templates

              Comment

              • richlv
                Senior Member
                Zabbix Certified Trainer
                Zabbix Certified SpecialistZabbix Certified Professional
                • Oct 2005
                • 3112

                #8
                it's a bit strange that zabbix fails to parse a fully numeric oid - would be useful to find out why so. if anybody has ideas/information, adding that to https://support.zabbix.com/browse/ZBX-9417 would be helpful
                Zabbix 3.0 Network Monitoring book

                Comment

                • oom_ben
                  Junior Member
                  • Apr 2024
                  • 1

                  #9
                  Wow, the last post on this thread was 8 years ago. I hope my question is still relevant.

                  I'm having a similar issue where I am trying to make use of {#SNMPINDEX} in an item prototype but it seems like the macro isn't working in my case.

                  I have a discovery rule to find chassis in the network which initiates the {#SNMPINDEX} variable as follows (Discovery rule result):
                  [{"{#SNMPINDEX}":"3","{#CHASNAME}":"Chassis #2373"},{"{#SNMPINDEX}":"6","{#CHASNAME}":"Chassis #2370"}]
                  So there are SNMPINDEXes 3 and 6 assigned

                  Yet on the item prototype, if I use the OID:

                  1.3.6.1.4.1.13732.1.2.1.1.5.{#SNMPINDEX} -> snmp_parse_oid() error
                  1.3.6.1.4.1.13732.1.2.1.1.5.3 -> Works, returns "No Alarms"

                  even as

                  SNMPv2-SMI::enterprises.13732.1.2.1.1.5.{#SNMPINDEX} -> snmp_parse_oid() error
                  SNMPv2-SMI::enterprises.13732.1.2.1.1.5.3 -> Works, returns "No Alarms"

                  Since this is a built in macro and the syntax is the same as in the documentation I don't understand why this is happening. Can someone tell me what I'm missing?

                  Comment


                  • user185953
                    user185953 commented
                    Editing a comment
                    What Zabbix version?

                    Originally posted by oom_ben
                    Yet on the item prototype, if I use the OID:

                    1.3.6.1.4.1.13732.1.2.1.1.5.{#SNMPINDEX} -> snmp_parse_oid() error
                    1.3.6.1.4.1.13732.1.2.1.1.5.3 -> Works, returns "No Alarms"
                    Weird, 1.3.6.1.4.1.13732.1.2.1.1.5.3 should give you nothing, because item prototypes can't have data.
                    This can only happen if you edit regular item, not prototype.
                Working...