I am trying to write a simple program that displays the front panel of cisco devices remotely (in this case a 3560 switch). So I need to read the status of each port via snmp and turn on the LED on my GUI accordingly.
After some search I came to use the "ifOperStatus" with OID 1.3.6.1.2.1.2.2.1.8.
But the problem is that this OID returns "1:up" as soon as a cable is plugged into the port and does not reflect the different status the port might have including:
Blinking green: Link has activity
Solid amber: Port is faulty
etc,
Any clue or hint on which OIDs I should use?
Best Answer
Have you looked at this OID ?
And the related :
Unfortunately the supported images/platforms are very limited : http://tools.cisco.com/ITDIT/MIBS/AdvancedSearch?MibSel=4682
I would say fake it, for link activity. Poll interface stats (bytes or frames or packets in or out) and make the light in your application blink as long as either is increasing.
(Though I suppose technically some control traffic might or might not cause the physical LED to blink - for example, do BPDUs alone count towards link activity ? I do not know - I can check later, if you'd like.)
I searched and browsed the SNMP Object Navigator (http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en) last night for you, but found nothing suitable (not to say it doesn't exist), and any potentially interesting ones were marked as inaccessible ("Permission not-accessible").
If you're feeling especially crafty, and want the utmost accuracy, you could probably setup an ambient light sensor / "light to frequency converter" in front of each crucial port LED, and code to have that info passed to your application.
But that's not scalable, so it's probably easier to fake it.
EDIT, ROUND 2 !
How about :
"This object is used to indicate the current color of a LED."
"The color of the LED."
"An integer value that describes the color of the display"
As well as,
mrStackUnitBasePortVisualIndicatorGreenMap,
mrStackUnitBasePortVisualIndicatorAmberMap,
mrStackUnitExpansionPortVisualIndicatorGreenMap,
mrStackUnitExpansionPortVisualIndicatorAmberMap, and
mrStackUnitActivityVisualIndicator
all under mrStackUnitEntry.
For ATM :
ciscoAtmIfXmitLed
ciscoAtmIfRecvLed
ciscoAtmIfCdLed
Finally, this nugget, from "CISCO-WIRELESS-EXP-MIB" :
"When the CISCO-LED-MIB.my becomes available and supports the functionality the LED group needs, the LED group will be migrated into that."
Apparently mention of a MIB that never came to be.