Showing results for 
Search instead for 
Did you mean: 

How to monitor CWDM SFPs metrics using SNMP?


Hi all,

We are currently monitoring approximately 50 locations each having one or more cisco devices, Catalyst 3750 and 3560.

Locations are connected via CWDM.

We would like to monitor interface errors, signal loss and power on CWDM SFP transceivers on Catalyst 3560 and Catalyst 3750 switches.

We tried to get these values (as shown using „sh interface transceiver“ command) using SNMP (through cisco-entity-sensor-mib) but we didn't get any SNMP result.

What would be the best approach to monitor these values?

What MIB or other functions/modules/features need to be used/activated on switch?

Do we need any additional piece of hardware?



25 Replies 25

Joe Clarke
Hall of Fame Cisco Employee Hall of Fame Cisco Employee
Hall of Fame Cisco Employee

What are the images you are running on these switches?  CISCO-ENTITY-SENSOR-MIB support is fairly new to these platforms (12.2(50)SE and higher).  I do not yet know if that MIB will give you what you want, but I don't see another MIB which could provide it.


thanks for the reply.

We tried to browse this MIB on Cat3560 (already under management) IOS: 12.2(25)SEE2. We found out this IOS doesn't support CISCO-ENTITY-SENSOR MIB and that we must to upgrade to at least 12.2(50)SE.

So we took one of our test switches, Cat3560 (WS-C3650-24TS) and upgraded IOS to 12.2(53)SE1.

We enabled SNMP using this command only (no other snmp-like commands were used):

snmp-server community ro

Even though we were connected directly to the switch with a laptop, we got no SNMP reply, not even a sysDescr (OID= which works fine on a laptop itself.

So we are unable to test basic SNMP, and of course ENTITY-SENSOR-MIB as well.

A few questions:

1. what steps/prereqs need to be performed to enable SNMP on a switch? is the above command the only required thing to do?

2. if we have no SNMP reply from a directly connected switch (configured for SNMP access using above command), what could be the cause? in what direction to look for root cause?

3. once we get this working, is the ENTITY-SENSOR-MIB the only way to monitor SFPs metrics or is there another way? Are there any other prerequisites or aspects we should take care of? What about DOM?

Basically, we would like to monitor these CWDM-SFPs parameters with using as much as SNMP if that's possible. We hope to get this monitoring without doing any kind of heavy configuration change on a switch. We hoped to get this working by upgrading IOS, and using SNMP to get the data through an appropriate MIB (so far we think CISCO-ENTITY-SENSOR-MIB is the MIB to provide this info).


Joe Clarke
Hall of Fame Cisco Employee Hall of Fame Cisco Employee
Hall of Fame Cisco Employee

Without seeing the full running config, I cannot say for certain why things are not working.  However, all that is required for SNMPv1 or v2c to work is a read-only community string as you have done.  Make sure the string does not contain an '@'.  If you're using net-snmp, make sure you explicitly specify the version as either v1 or v2c:

snmpwalk -c public -v 2c sysDescr

As far as I can tell, this would be the only likely candidate MIB.  I do not have a 3560 with SFP or GBIC ports with which to confirm.

Provided the MIB works, you shouldn't need to configure anything more than you already have to get what you want.


we didn't use any '@' in our community string.

We didn't use net-snmp, we use some kind of command line SNMP utility "ssnmpq" : Simple SNMP Command Line Query Tool

But that's not really important, the tool works fine in other cases....

I'll try with net-snmp (snmpwalk) and post my progress....

What kind of config output (running config) would you like to see? This is really bugging me. Instad of testing the CISCO-ENTITY-SENSOR MIB, i'm still stuck at making my switch to respond to a basic SNMP request.....


Joe Clarke
Hall of Fame Cisco Employee Hall of Fame Cisco Employee
Hall of Fame Cisco Employee

A full show run as well as the output from "debug snmp packet" when polling the device would be helpful.  I assume that you have tested connectivity otherwise from your management station (i.e. you can ping/telnet/SSH to the switch)?

You'll need to configure the following in IOS for DOM monitoring, which also populates the results in CISCO-ENTITY-SENSOR-MIB, so it's a moot point until you can get the basic snmpwalk/snmpget working.

transceiver type all

Other than SNMP, you could have a script (in Expert or Perl with grab the outputs from IOS CLI:

show interface transceiver detail

show hw-module subslot [module number]/[slot number] transceiver [transreceiver number] status

Hi guys, thanks for your answers...

To Joe: SNMP access is OK now, we had a connectivity problem there anymore, i can get the sysDescr OID.

To yjdabear: I'm testing on 3560, i don't think "transceiver type all" is a supported command.

To everybody: OK, let's summ up. I have managed to get the basic SNMP access to my test 3560 switch. The IOS is upgraded to support the CISCO-ENTITY-SENSOR MIB.

After running these commands, this is the otput:

SW4#show interfaces Gi0/1 transceiver properties
Diagnostic Monitoring is not implemented.
Name : Gi0/1
Administrative Speed: auto
Administrative Duplex: auto
Administrative Auto-MDIX: on
Administrative Power Inline: N/A
Operational Speed: 1000
Operational Duplex: full
Operational Auto-MDIX: on
Media Type: 1000BaseSX SFP

SW4#show interfaces Gi0/1 transceiver detail
Diagnostic Monitoring is not implemented.

So, "Diagnostic Monitoring is not implemented." tells me that i have 1000BaseSX SFP without DOM support i guess.

As per Cisco notes, these SFP SX product number exists:

GLC-SX-MM - without DOM support

GLC-SX-MM-RGD - without DOM support

SFP-GE-S - DOM supported

So i guess i have one of first two SFPs?

Is there a way to check this via CLI or SNMP or this info can only be found on a SFP label (sticker)?


Joe Clarke
Hall of Fame Cisco Employee Hall of Fame Cisco Employee
Hall of Fame Cisco Employee

It looks like the transceiver command is only for 7600 devices.  The part number may be listed on the SFP itself, but I cannot see where you would see this in the CLI.  The "show inventory" command does not get that kind of detail.  You might try doing an SNMP Walk of the entPhysicalTable, and see if entPhysicalModelName provides it to you.

That said, the "show interface trasceiver properties" command seems to reinforce the fact that DOM will not be possible.

Bummer. So I suppose the CWDM SFP turns out to be SX SFP that doesn't have DOM support.

Hi guys...

To Joe:

my Cisco engeneers colleagues tryed to get SFP product number on CLI, but no luck. I guess it's not so important, of course it is available on the SFP itself, on the stricker.

To Yjbabear:

Actually we have SX, LX, ZX and CWDM SFPs in our infrastructure... :-)

Whether one supports DOM, obviously depends on the Product Model.

That's why i want to get a broader picture, a generic way of monitoring optic parameters.I'm learning on the fly here....

But in the end, CWDM interfaces will be in the focus...

Okay, today we're gonna replace this SX SFP on a test switch with a CWDM one, and hopefully i'll be able to test CISCO-ENTITY-SENSOR MIB.

I'll post my results...

Regards, Marko

OK,we have tested the CWDM SFP and we're getting the data via CISCO-ENTITY-SENSOR-MIB.

Here are the results.

Via CLI:

W4#sh interfaces Gi0/1 transceiver properties
ITU Channel not available (Wavelength not available),
Transceiver is externally calibrated.
Name : Gi0/1
Administrative Speed: auto
Administrative Duplex: auto
Administrative Auto-MDIX: on
Administrative Power Inline: N/A
Operational Speed: 1000
Operational Duplex: full
Operational Auto-MDIX: on
Media Type: CWDM-1550 SFP

SW4#sh interfaces gi0/1 transceiver
ITU Channel not available (Wavelength not available),
Transceiver is externally calibrated.
If device is externally calibrated, only calibrated values are printed.
++ : high alarm, +  : high warning, -  : low warning, -- : low alarm.
NA or N/A: not applicable, Tx: transmit, Rx: receive.
mA: milliamperes, dBm: decibels (milliwatts).

                                 Optical   Optical
           Temperature  Voltage  Tx Power  Rx Power
Port       (Celsius)    (Volts)  (dBm)     (dBm)
---------  -----------  -------  --------  --------
Gi0/1        49.0       3.24       3.2     -12.9

Via MIB:


Index ValueentPhysicalDescrentPhysicalVendorTypeentPhysicalContainedInentPhysicalClassentPhysicalParentRelPosentPhysicalNameentPhysicalAliasentPhysicalIsFRU
1056CWDM-1550 SFP.
1057GigabitEthernet0/1 Module Temperature Sensor. Module Temperature Sensor2
1058GigabitEthernet0/1 Supply Voltage Sensor. Supply Voltage Sensor2
1059GigabitEthernet0/1 Bias Current Sensor. Bias Current Sensor2
1060GigabitEthernet0/1 Transmit Power Sensor. Transmit Power Sensor2
1061GigabitEthernet0/1 Receive Power Sensor. Receive Power Sensor2


Index ValueentSensorTypeentSensorScaleentSensorPrecisionentSensorValueentSensorStatusentSensorValueTimeStampentSensorValueUpdateRate
1057celsiusunits1490ok96 hours 16 minutes 4 seconds600
1058voltsDCunits2324ok96 hours 16 minutes 4 seconds600
1059amperesmilli1336ok96 hours 16 minutes 4 seconds600
106014units132ok96 hours 16 minutes 4 seconds600
106114units1-129ok96 hours 16 minutes 4 seconds600

OK, so what we see here is:

  1. indexes 1057-1061 are sensors on 1056 (this is CWDM SFP)
  2. their Types are presented in entSensorType
    1. why 1060 and 1061 (Transmit Power and Receive Power) have Type=14? The CISCO-ENTITY-SENSOR-MIB recognizes types from 1-13 and has string names for them, but 1060 and 1061 types are obviously returned by the IOS as "14" (no Type equivalent for 14 in MIB), is that correct? Does this depend on MIB used in MIBBrowser or MIB compiled in IOS on switch? How to make SNMP GET to return "decibels", "dBm" or "milliwatts" instead of "14"?
  3. Sensor Scale and Sensor Precision for 1060 an 1061 are "units" with precision "1". That would mean that:
    1. a value of 32 for 1060 would lead to 3,2 dBm (as in CLI output) having 32*10^0=32, and it is a number with 1(=Precision) decimal place. Am i getting this right? This is "explained" in the MIB but i didn't quite understand it...
    2. also, a value of -129 for 1061 would lead to -12,9 dBm (as in CLI output) having -129*10^0=-129, and it is a number  with 1(=Precision) decimal place.
  4. 1059 (Bias Current) is not returned in CLI, but 336 with Type=amperes, Scale=milli (10^-3) and Precision=1 would lead to: 33,6 * 10^-3 amperes or 33,6 milliamperes?
  5. 1058 (Supply Voltage) is 324 with Type=voltsDC, Scale=units and Precision=2 would lead to: 3,24 voltsDC (as in CLI output)

Am i getting this right? As this is the only CWDM i can test, i want to make sure my understanding is correct and my math will be universal for all other devices/interfaces with SFPs.

If i want to get these values from many different nodes and interfaces, what would be variable, and what would be constant?

I guess Supply Voltage will not allways be "1058", or would it?

The problem is, how will i know what OID to target if i want to get the entSensorValue of Supply Voltage Sensor?

. - this is the OID for enSensorValue

but how do I target the value for a particular sensor on a particular interface?

It should look something like

. where X is the interface index (maybe entPhysicalAlias form ENTITY-MIB?) and Y is the sensor index?

So in my test case this would be:

. ???

I need help to get through this....


Joe Clarke
Hall of Fame Cisco Employee Hall of Fame Cisco Employee
Hall of Fame Cisco Employee

1. Correct.

2. You have an older version of the MIB.  Type 14 corresponds to dBm.  I have posted the latest copy here.

3a. Absolutely correct.  A precision value of 1 means that there is one decimal point, so the number is displayed in tenths.  A value of 32 would be 32 tenths or 3.2.

3b. Precisely

4. You said it right.  The 336 value is actually 336 tenths of a milliamp.  So, the actual value as written would be 33.6 mA.

5. Exactly.

Your approach is correct, and would be the same for all sensors supporting the CISCO-ENTITY-SENSOR-MIB.

The entPhysicalIDs (i.e. the numbers 1058, 1056, etc. in your example) are dynamic, and will change from platform to platform, and possibly even boot to boot.  The way you need to determine which sensor corresponds to whch interface module is to walk the entPhysicalTable, and tie an entPhysicalID with an entPhysicalName (e.g. the entPhysicalName will be something like Gi0/1).

The entSensorTable is indexed by entPhysicalID only.  So, you will need to know the entPhysicalID for your interface, then find the sensors which are children of that interface/port entity.

Thanks Joe.

Thanks for the new MIB, but please clarify this: you said I have an older version of the MIB (where? in my MIB browsing tool or on a switch IOS?) and you sent me a new version that introduces entSensorType="14" as "dBm". But what to do with this new MIB?

The Cisco IOS will still return entSensorType="14" instead of entSensorType="dBm" regardless of if I use this new mib in my mib browser or not?

Can i compile this new version of CISCO-ENTITY-SENSOR-MIB to IOS somehow or what?

Joe Clarke
Hall of Fame Cisco Employee Hall of Fame Cisco Employee
Hall of Fame Cisco Employee

IOS actually has knowledge of a newer version of the MIB, but IOS will ALWAYS send 14.  The MIB files are there just to give context and meaning to the values returned by the agent.  The agent still only sends the integer value of the enumeration on the wire.

You need to load the new version of the MIB into your NMS so that it can properly translate the 14 to the textual representation of dBm.

No, you can not add new MIBs or new MIB versions to IOS.

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:

Recognize Your Peers