cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10622
Views
10
Helpful
2
Comments
Mahabir Prasad
Level 1
Level 1

Following is how we can retrieve and interpret sensor (power, voltage, current) of a slot/port via SNMP

For example this is the CLI output from 6500 and we want to monitor tx/rx power for Te2/4

#sh interface transceiver detail

Optical            High Alarm  High Warn  Low Warn   Low Alarm

            Transmit Power     Threshold   Threshold  Threshold  Threshold

Port        (dBm)              (dBm)       (dBm)      (dBm)      (dBm)

----------  -----------------  ----------  ---------  ---------  ---------

Te2/1         N/A                 4.4         0.4        -8.2      -12.2

Te2/2        -2.5                 2.9        -1.0        -7.3      -11.3

Te2/3         N/A                 4.4         0.4        -8.2      -12.2

Te2/4        -1.9                 4.4         0.4        -8.2      -12.2

Te2/5        -2.5                 4.4         0.4        -8.2      -12.2

Te2/6        -2.9                 2.9        -1.0        -7.3      -11.3

Te2/7        -2.6                 2.9        -1.0        -7.3      -11.3

            Optical            High Alarm  High Warn  Low Warn   Low Alarm

            Receive Power      Threshold   Threshold  Threshold  Threshold

Port        (dBm)              (dBm)       (dBm)      (dBm)      (dBm)

----------  -----------------  ----------  ---------  ---------  ---------

Te2/1         N/A                 4.4         0.4       -14.4      -18.4

Te2/2        -2.5                 2.9        -1.0        -9.9      -13.9

Te2/3         N/A                 4.4         0.4       -14.4      -18.4

Te2/4        -8.5                 4.4         0.4       -14.4      -18.4

Te2/5        -8.0                 4.4         0.4       -14.4      -18.4

Te2/6        -3.4                 2.9        -1.0        -9.9      -13.9

Te2/7        -3.0                 2.9        -1.0        -9.9      -13.9

Step 1: We need to poll 1.3.6.1.2.1.47.1.1.1.1.2 (entPhysicalDescr) which is part of ENTITY-MIB. This will provide us index and descriptoin of particular sensor which we want to monitor.

Partial output of snmpwalk of 1.3.6.1.2.1.47.1.1.1.1.2 shown below:

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2022 = STRING: "TenGigabitEthernet2/1 Transmit Power Sensor"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2023 = STRING: "TenGigabitEthernet2/1 Receive Power Sensor"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2035 = STRING: "TenGigabitEthernet2/2 Transmit Power Sensor"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2036 = STRING: "TenGigabitEthernet2/2 Receive Power Sensor"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2061 = STRING: "TenGigabitEthernet2/4 Transmit Power Sensor"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2062 = STRING: "TenGigabitEthernet2/4 Receive Power Sensor"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2074 = STRING: "TenGigabitEthernet2/5 Transmit Power Sensor"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2075 = STRING: "TenGigabitEthernet2/5 Receive Power Sensor"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2087 = STRING: "TenGigabitEthernet2/6 Transmit Power Sensor"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2088 = STRING: "TenGigabitEthernet2/6 Receive Power Sensor"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2100 = STRING: "TenGigabitEthernet2/7 Transmit Power Sensor"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2101 = STRING: "TenGigabitEthernet2/7 Receive Power Sensor"

Red highlighted values are indexes of sensors we are interested in.

STEP 2: SNMPWALK of 1.3.6.1.4.1.9.9.91.1.1.1.1.4 (entSensorValue) which is part of CISCO-ENTITY-SENSOR-MIB

Partial output of snmpwalk of 1.3.6.1.4.1.9.9.91.1.1.1.1.4 shown below:

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2022 = INTEGER: 0

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2023 = INTEGER: 0

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2035 = INTEGER: -25

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2036 = INTEGER: -25

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2061 = INTEGER: -19

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2062 = INTEGER: -85

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2074 = INTEGER: -25

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2075 = INTEGER: -80

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2087 = INTEGER: -29

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2088 = INTEGER: -34

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2100 = INTEGER: -26

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2101 = INTEGER: -30

STEP 3: Interpret values

For interpreting values we need to poll below: entSensorType , entSensorScale and entSensorPrecision. Description of these objects given below:

.1.3.6.1.4.1.9.9.91.1.1.1.1.1

entSensorType OBJECT-TYPE

        -- FROM CISCO-ENTITY-SENSOR-MIB

        -- TEXTUAL CONVENTION SensorDataType

        SYNTAX         Integer { other(1), unknown(2), voltsAC(3), voltsDC(4), amperes(5), watts(6), hertz(7), celsius(8), percentRH(9), rpm(10), cmm(11), truthvalue(12), specialEnum(13), dBm(14) }

        MAX-ACCESS     read-only

        STATUS         Current

        DESCRIPTION    "This variable indicates the type of data

        reported by the entSensorValue.

.1.3.6.1.4.1.9.9.91.1.1.1.1.2

entSensorScale OBJECT-TYPE

        -- FROM CISCO-ENTITY-SENSOR-MIB

        -- TEXTUAL CONVENTION SensorDataScale

        SYNTAX         Integer { yocto(1), zepto(2), atto(3), femto(4), pico(5), nano(6), micro(7), milli(8), units(9), kilo(10), mega(11), giga(12), tera(13), exa(14), peta(15), zetta(16), yotta(17) }

        MAX-ACCESS     read-only

        STATUS         Current

        DESCRIPTION    "This variable indicates the exponent to apply

        to sensor values reported by entSensorValue.

        This variable is set by the agent at start-up

        and the value does not change during operation."

1.3.6.1.4.1.9.9.91.1.1.1.1.3

entSensorPrecision OBJECT-TYPE

        -- FROM CISCO-ENTITY-SENSOR-MIB

        -- TEXTUAL CONVENTION SensorPrecision

        SYNTAX         Integer (-8..9)

        MAX-ACCESS     read-only

        STATUS         Current

        DESCRIPTION    "This variable indicates the number of decimal

        places of precision in fixed-point

        sensor values reported by entSensorValue.

        This variable is set to 0 when entSensorType

        is not a fixed-point type:  voltsAC(1), voltsDC(2),

        amperes(3), watts(4), hertz(5), celsius(6), or cmm(9).

        This variable is set by the agent at start-up

        and the value does not change during operation."

Now for example we have to interpret values for transmit and receive power of TE2/4. So

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.2061 = INTEGER: 14                            -----> means dBm

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.2.2061 = INTEGER: 9                              -----> means units

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.3.2061 = INTEGER: 1                              -----> number of decimal place is one

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2061 = INTEGER: -19                          -----> after placing decimal after one integer value is -1.9 dBm which is actual value

Note:

On nexus entityPhysicalIndex are not supported for slot/port which are required to make correlation between interface and entitySensorValue.

Enhancement request (CSCty93934) for nexus 7k and  (CSCui73423) for nexus 5k is opened.

Comments
agallegos
Community Member

Great help thanks!

I´m looking also for High Alarm, High Warn,Low Warn and Low Alarm Thresholds, but can´t find the OIDs. How could I manage with that?

agallegos
Community Member

Answering myself.

OID should be

iso.3.6.1.4.1.9.9.91.1.2.1.1.4

We can see for a single interface, 4 indexes (RX or TX).

iso.3.6.1.4.1.9.9.91.1.2.1.1.4.2061.1 = INTEGER: 15 
iso.3.6.1.4.1.9.9.91.1.2.1.1.4.2061.2 = INTEGER: 794 
iso.3.6.1.4.1.9.9.91.1.2.1.1.4.2061.3 = INTEGER: 10 
iso.3.6.1.4.1.9.9.91.1.2.1.1.4.2061.4 = INTEGER: 1258 

where:

.1 Low Warning

.2 High Warning

.3 Low Alarm

.4 High Alarm

The format should be the same as SensorValue

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking for a $25 gift card