Ad Widget

Collapse

Unable to get interface description : different discovery & description index in OID

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rohix
    Junior Member
    • Sep 2018
    • 3

    #1

    Unable to get interface description : different discovery & description index in OID


    Dear All,

    I've struggled a lot over this. Couldn't find solutions. Required expert help.


    I'm working on Huawei Switches. I'm monitoring Optical interface (SFP) Power(Voltage) Tx/Rx.

    Requirements :

    I want to show interface and interface description in "item name".
    e.g
    Optical Interface XGigabitEthernet0/0/4(To switch first floor): SFP Optical Rx

    Problem:

    I'm not able to get description of interface because discovery index {#SNMPINDEX} is not same in OID.
    i.e
    index for "XGigabitEthernet0/0/2" interface is 67321998 while index for description is 30

    Interface Name OID.

    snmpwalk -v 2c -Ofs -c <Communication String> <IP> .1.3.6.1.2.1.47.1.1.1.1.7

    mib-2.47.1.1.1.1.7.67305550 = STRING: "GigabitEthernet0/0/1"
    mib-2.47.1.1.1.1.7.67305614 = STRING: "GigabitEthernet0/0/2"
    mib-2.47.1.1.1.1.7.67305678 = STRING: "GigabitEthernet0/0/3"
    mib-2.47.1.1.1.1.7.67305742 = STRING: "GigabitEthernet0/0/4"
    mib-2.47.1.1.1.1.7.67305806 = STRING: "GigabitEthernet0/0/5"
    mib-2.47.1.1.1.1.7.67305870 = STRING: "GigabitEthernet0/0/6"
    mib-2.47.1.1.1.1.7.67305934 = STRING: "GigabitEthernet0/0/7"
    mib-2.47.1.1.1.1.7.67305998 = STRING: "GigabitEthernet0/0/8"
    mib-2.47.1.1.1.1.7.67306062 = STRING: "GigabitEthernet0/0/9"
    mib-2.47.1.1.1.1.7.67306126 = STRING: "GigabitEthernet0/0/10"
    mib-2.47.1.1.1.1.7.67306190 = STRING: "GigabitEthernet0/0/11"
    mib-2.47.1.1.1.1.7.67306254 = STRING: "GigabitEthernet0/0/12"
    mib-2.47.1.1.1.1.7.67306318 = STRING: "GigabitEthernet0/0/13"
    mib-2.47.1.1.1.1.7.67306382 = STRING: "GigabitEthernet0/0/14"
    mib-2.47.1.1.1.1.7.67306446 = STRING: "GigabitEthernet0/0/15"
    mib-2.47.1.1.1.1.7.67306510 = STRING: "GigabitEthernet0/0/16"
    mib-2.47.1.1.1.1.7.67306574 = STRING: "GigabitEthernet0/0/17"
    mib-2.47.1.1.1.1.7.67306638 = STRING: "GigabitEthernet0/0/18"
    mib-2.47.1.1.1.1.7.67306702 = STRING: "GigabitEthernet0/0/19"
    mib-2.47.1.1.1.1.7.67306766 = STRING: "GigabitEthernet0/0/20"
    mib-2.47.1.1.1.1.7.67306830 = STRING: "GigabitEthernet0/0/21"
    mib-2.47.1.1.1.1.7.67306894 = STRING: "GigabitEthernet0/0/22"
    mib-2.47.1.1.1.1.7.67306958 = STRING: "GigabitEthernet0/0/23"
    mib-2.47.1.1.1.1.7.67307022 = STRING: "GigabitEthernet0/0/24"
    mib-2.47.1.1.1.1.7.67321934 = STRING: "XGigabitEthernet0/0/1"
    mib-2.47.1.1.1.1.7.67321998 = STRING: "XGigabitEthernet0/0/2"
    mib-2.47.1.1.1.1.7.67322062 = STRING: "XGigabitEthernet0/0/3"
    mib-2.47.1.1.1.1.7.67322126 = STRING: "XGigabitEthernet0/0/4"


    Interface Optical power Voltage OID.

    snmpwalk -v 2c -Ofs -c <Communication String> <IP> 1.3.6.1.4.1.2011.5.25.31.1.1.3.1.8

    enterprises.2011.5.25.31.1.1.3.1.8.67305550 = INTEGER: 111
    enterprises.2011.5.25.31.1.1.3.1.8.67305614 = INTEGER: 50
    enterprises.2011.5.25.31.1.1.3.1.8.67305678 = INTEGER: 117
    enterprises.2011.5.25.31.1.1.3.1.8.67305742 = INTEGER: 22
    enterprises.2011.5.25.31.1.1.3.1.8.67305806 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67305870 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67305934 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67305998 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67306062 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67306126 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67306190 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67306254 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67306318 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67306382 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67306446 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67306510 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67306574 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67306638 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67306702 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67306766 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67306830 = INTEGER: 167
    enterprises.2011.5.25.31.1.1.3.1.8.67306894 = INTEGER: 0
    enterprises.2011.5.25.31.1.1.3.1.8.67306958 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67307022 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67321934 = INTEGER: 27
    enterprises.2011.5.25.31.1.1.3.1.8.67321998 = INTEGER: 43
    enterprises.2011.5.25.31.1.1.3.1.8.67322062 = INTEGER: -1
    enterprises.2011.5.25.31.1.1.3.1.8.67322126 = INTEGER: -1

    Interface description.

    snmpwalk -v 2c -Ofs -c <Communication String> <IP> 1.3.6.1.2.1.31.1.1.1.18
    ifAlias.1 = STRING:
    ifAlias.2 = STRING:
    ifAlias.3 = STRING:
    ifAlias.4 = STRING:
    ifAlias.5 = STRING: XXXXXXXXXXXXXXXXXXXX
    ifAlias.6 = STRING: XXXXXXXXXXXXXXXXXXXX
    ifAlias.7 = STRING: XXXXXXXXXXXXXXXXXXXX
    ifAlias.8 = STRING:
    ifAlias.9 = STRING:
    ifAlias.10 = STRING:
    ifAlias.11 = STRING:
    ifAlias.12 = STRING:
    ifAlias.13 = STRING:
    ifAlias.14 = STRING:
    ifAlias.15 = STRING:
    ifAlias.16 = STRING:
    ifAlias.17 = STRING:
    ifAlias.18 = STRING:
    ifAlias.19 = STRING:
    ifAlias.20 = STRING:
    ifAlias.21 = STRING:
    ifAlias.22 = STRING:
    ifAlias.23 = STRING:
    ifAlias.24 = STRING:
    ifAlias.25 = STRING: XXXXXXXXXXXXXXXXXXXX
    ifAlias.26 = STRING:
    ifAlias.27 = STRING:
    ifAlias.28 = STRING:
    ifAlias.29 = STRING: XXXXXXXXXXXXXXXXXXXX
    ifAlias.30 = STRING: To switch first floor
    ifAlias.31 = STRING:
    ifAlias.32 = STRING:
    ifAlias.34 = STRING:

    Interface description mapping to optical interface indexes mapping

    snmpwalk -v 2c -Ofs -c <Communication String> <IP> 1.3.6.1.2.1.47.1.3.2.1.2

    mib-2.47.1.3.2.1.2.67305550.1 = OID: ifIndex.5
    mib-2.47.1.3.2.1.2.67305614.1 = OID: ifIndex.6
    mib-2.47.1.3.2.1.2.67305678.1 = OID: ifIndex.7
    mib-2.47.1.3.2.1.2.67305742.1 = OID: ifIndex.8
    mib-2.47.1.3.2.1.2.67305806.1 = OID: ifIndex.9
    mib-2.47.1.3.2.1.2.67305870.1 = OID: ifIndex.10
    mib-2.47.1.3.2.1.2.67305934.1 = OID: ifIndex.11
    mib-2.47.1.3.2.1.2.67305998.1 = OID: ifIndex.12
    mib-2.47.1.3.2.1.2.67306062.1 = OID: ifIndex.13
    mib-2.47.1.3.2.1.2.67306126.1 = OID: ifIndex.14
    mib-2.47.1.3.2.1.2.67306190.1 = OID: ifIndex.15
    mib-2.47.1.3.2.1.2.67306254.1 = OID: ifIndex.16
    mib-2.47.1.3.2.1.2.67306318.1 = OID: ifIndex.17
    mib-2.47.1.3.2.1.2.67306382.1 = OID: ifIndex.18
    mib-2.47.1.3.2.1.2.67306446.1 = OID: ifIndex.19
    mib-2.47.1.3.2.1.2.67306510.1 = OID: ifIndex.20
    mib-2.47.1.3.2.1.2.67306574.1 = OID: ifIndex.21
    mib-2.47.1.3.2.1.2.67306638.1 = OID: ifIndex.22
    mib-2.47.1.3.2.1.2.67306702.1 = OID: ifIndex.23
    mib-2.47.1.3.2.1.2.67306766.1 = OID: ifIndex.24
    mib-2.47.1.3.2.1.2.67306830.1 = OID: ifIndex.25
    mib-2.47.1.3.2.1.2.67306894.1 = OID: ifIndex.26
    mib-2.47.1.3.2.1.2.67306958.1 = OID: ifIndex.27
    mib-2.47.1.3.2.1.2.67307022.1 = OID: ifIndex.28
    mib-2.47.1.3.2.1.2.67321934.1 = OID: ifIndex.29
    mib-2.47.1.3.2.1.2.67321998.1 = OID: ifIndex.30
    mib-2.47.1.3.2.1.2.67322062.1 = OID: ifIndex.31
    mib-2.47.1.3.2.1.2.67322126.1 = OID: ifIndex.32
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Interfaces descriptions should be in IF-MIB::ifDesc.
    IF=MIB::ifAlias it is not interface description.
    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

    • rohix
      Junior Member
      • Sep 2018
      • 3

      #3
      Correct description is in IF-MIB::ifDesc. this just a example.

      my problem in {#SNMPINDEX} not being same in "Optical power Voltage OID." one is 67321998 while index for description/aliases is 30.

      I'm not able to get description of interface because discovery index {#SNMPINDEX} is not same in OID.
      i.e
      index for "XGigabitEthernet0/0/2" interface is 67321998 while index for description is 30

      Comment

      • rohix
        Junior Member
        • Sep 2018
        • 3

        #4
        Any body??

        Comment

        • kloczek
          Senior Member
          • Jun 2006
          • 1771

          #5
          Originally posted by rohix
          Correct description is in IF-MIB::ifDesc. this just a example.

          my problem in {#SNMPINDEX} not being same in "Optical power Voltage OID." one is 67321998 while index for description/aliases is 30.

          I'm not able to get description of interface because discovery index {#SNMPINDEX} is not same in OID.
          i.e
          index for "XGigabitEthernet0/0/2" interface is 67321998 while index for description is 30
          If you see such inconsistencies in snmp{.bulk}walk commands output you need to contact HW vendor because it is bug on SNMP agent side.
          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

          • xtianfab
            Junior Member
            • Aug 2023
            • 15

            #6
            I know I'm a little late, but did you manage to solve this? I have the same problem

            Comment

            Working...