[collectd] SNMP polling of switch sensors (complex SNMP setup I can't figure out)
Stian Øvrevåge
sovrevage at gmail.com
Wed Feb 29 22:24:06 CET 2012
Hi list,
I have a series of Cisco switches with sensors on each port measuring
Tx/Rx power, temperatures etc. I'm not sure however how to configure
the SNMP plugin to poll this.
My primary index for looking up data is the ifIndex, and secondarily
the interface name.
IF-MIB::ifIndex.148 = INTEGER: 148
IF-MIB::ifDescr.148 = STRING: TenGigabitEthernet6/3
There is a mapping to the physical port in the entity-mib:
ENTITY-MIB::entAliasMappingIdentifier.6007.0 = OID: IF-MIB::ifIndex.148
ENTITY-MIB::entPhysicalDescr.6007 = STRING: SFP-10Gbase-LR
ENTITY-MIB::entPhysicalVendorType.6007 = OID:
CISCO-ENTITY-VENDORTYPE-OID-MIB::cevSFP10GLR
ENTITY-MIB::entPhysicalContainedIn.6007 = INTEGER: 6003
ENTITY-MIB::entPhysicalClass.6007 = INTEGER: port(10)
ENTITY-MIB::entPhysicalParentRelPos.6007 = INTEGER: 1
ENTITY-MIB::entPhysicalName.6007 = STRING: TenGigabitEthernet6/3
ENTITY-MIB::entPhysicalHardwareRev.6007 = STRING: V02
ENTITY-MIB::entPhysicalFirmwareRev.6007 = STRING:
ENTITY-MIB::entPhysicalSoftwareRev.6007 = STRING:
ENTITY-MIB::entPhysicalSerialNum.6007 = STRING: XG96LR083
ENTITY-MIB::entPhysicalMfgName.6007 = STRING: OEM
ENTITY-MIB::entPhysicalModelName.6007 = STRING: SFP-10G-LR
ENTITY-MIB::entPhysicalAlias.6007 = STRING:
ENTITY-MIB::entPhysicalAssetID.6007 = STRING:
ENTITY-MIB::entPhysicalIsFRU.6007 = INTEGER: true(1)
ENTITY-MIB::entPhysicalChildIndex.6007.6023 = INTEGER: 6023
ENTITY-MIB::entPhysicalChildIndex.6007.6027 = INTEGER: 6027
ENTITY-MIB::entPhysicalChildIndex.6007.6031 = INTEGER: 6031
ENTITY-MIB::entPhysicalChildIndex.6007.6035 = INTEGER: 6035
ENTITY-MIB::entPhysicalChildIndex.6007.6039 = INTEGER: 6039
The last rows here reference all the sensors connected to this physical port.
For each sensor there is some info about the sensor itself, most
importantly the name of it:
ENTITY-MIB::entPhysicalDescr.6035 = STRING: TenGigabitEthernet6/3
Transmit Power Sensor
ENTITY-MIB::entPhysicalVendorType.6035 = OID:
CISCO-ENTITY-VENDORTYPE-OID-MIB::cevSensorTransceiverTxPwr
ENTITY-MIB::entPhysicalContainedIn.6035 = INTEGER: 6007
ENTITY-MIB::entPhysicalClass.6035 = INTEGER: sensor(8)
ENTITY-MIB::entPhysicalParentRelPos.6035 = INTEGER: 4
ENTITY-MIB::entPhysicalName.6035 = STRING: Te6/3 Transmit Power Sensor
ENTITY-MIB::entPhysicalHardwareRev.6035 = STRING:
ENTITY-MIB::entPhysicalFirmwareRev.6035 = STRING:
ENTITY-MIB::entPhysicalSoftwareRev.6035 = STRING:
ENTITY-MIB::entPhysicalSerialNum.6035 = STRING:
ENTITY-MIB::entPhysicalMfgName.6035 = STRING:
ENTITY-MIB::entPhysicalModelName.6035 = STRING:
ENTITY-MIB::entPhysicalAlias.6035 = STRING:
ENTITY-MIB::entPhysicalAssetID.6035 = STRING:
ENTITY-MIB::entPhysicalIsFRU.6035 = INTEGER: false(2)
And lastly there is the sensor data itself:
CISCO-ENTITY-SENSOR-MIB::entSensorType.6035 = INTEGER: dBm(14)
CISCO-ENTITY-SENSOR-MIB::entSensorScale.6035 = INTEGER: units(9)
CISCO-ENTITY-SENSOR-MIB::entSensorPrecision.6035 = INTEGER: 1
CISCO-ENTITY-SENSOR-MIB::entSensorValue.6035 = INTEGER: -23
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.6035 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorValueTimeStamp.6035 = Timeticks:
(571817747) 66 days, 4:22:57.47
CISCO-ENTITY-SENSOR-MIB::entSensorValueUpdateRate.6035 = INTEGER: 600 seconds
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdSeverity.6035.1 = INTEGER: major(20)
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdSeverity.6035.2 = INTEGER: minor(10)
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdSeverity.6035.3 = INTEGER: minor(10)
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdSeverity.6035.4 = INTEGER: major(20)
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdRelation.6035.1 = INTEGER:
greaterOrEqual(4)
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdRelation.6035.2 = INTEGER:
greaterOrEqual(4)
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdRelation.6035.3 = INTEGER:
lessOrEqual(2)
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdRelation.6035.4 = INTEGER:
lessOrEqual(2)
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdValue.6035.1 = INTEGER: 34
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdValue.6035.2 = INTEGER: 4
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdValue.6035.3 = INTEGER: -82
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdValue.6035.4 = INTEGER: -122
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdEvaluation.6035.1 = INTEGER: false(2)
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdEvaluation.6035.2 = INTEGER: false(2)
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdEvaluation.6035.3 = INTEGER: false(2)
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdEvaluation.6035.4 = INTEGER: false(2)
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdNotificationEnable.6035.1 =
INTEGER: true(1)
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdNotificationEnable.6035.2 =
INTEGER: true(1)
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdNotificationEnable.6035.3 =
INTEGER: true(1)
CISCO-ENTITY-SENSOR-MIB::entSensorThresholdNotificationEnable.6035.4 =
INTEGER: true(1)
How would I construct Table/Instance/Values for all this to come
together in a useful way? I have about 2.500 of these ports, so any
manual setup is impossible. I need it to be discovered and named
automatically...
Brgds,
Stian Ovrevage
More information about the collectd
mailing list