5.02021-11-21T21:25:29ZCiscoTemplatesCisco_SensorsCisco_Sensors## Overview
This template gets informations from optical sensors in Cisco switches/routes. It will get optical transmit and receive power from each optical interface connected in.
It uses mibs CISCO-ENTITY-SENSOR-MIB and CISCO-ENVMON-MIB.
Do not forget to add this lines to snmp.conf!
mibs +CISCO-ENTITY-SENSOR-MIB
mibs +CISCO-ENVMON-MIB
After discovery, template finds all connected GBICs and get informations about thresholds and signal levels.
There are triggers included which will be PROBLEM if signal level is out of range or if signal level changes in time.
Just apply template to your box and set macro {$SNMP\_COMMUNITY} to fit your needs.
## Author
Lukas Macura
CiscoTemplatesSensorsSensors discoverySNMP_AGENTdiscovery[{#SNMPVALUE},ENTITY-MIB::entPhysicalDescr]snmp.discoverysensors180AND{#SNMPVALUE}Receive Power|Transmit PowerASensor threshold eval 1: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdEvaluation.{#SNMPINDEX}.1sensorte1[{#SNMPINDEX}]3007d30dSensorsSensorTresholdEvalSensor threshold eval 2: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdEvaluation.{#SNMPINDEX}.2sensorte2[{#SNMPINDEX}]3007d30dSensorsSensorTresholdEvalSensor threshold eval 3: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdEvaluation.{#SNMPINDEX}.3sensorte3[{#SNMPINDEX}]3007d30dSensorsSensorTresholdEvalSensor threshold eval 4: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdEvaluation.{#SNMPINDEX}.4sensorte4[{#SNMPINDEX}]3007d30dSensorsSensorTresholdEvalSensor threshold relation 1: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdRelation.{#SNMPINDEX}.1sensortr1[{#SNMPINDEX}]3007d30dSensorsSensorTresholdRelSensor threshold relation 2: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdRelation.{#SNMPINDEX}.2sensortr2[{#SNMPINDEX}]3007d30dSensorsSensorTresholdRelSensor threshold relation 3: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdRelation.{#SNMPINDEX}.3sensortr3[{#SNMPINDEX}]3007d30dSensorsSensorTresholdRelSensor threshold relation 4: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdRelation.{#SNMPINDEX}.4sensortr4[{#SNMPINDEX}]3007d30dSensorsSensorTresholdRelSensor threshold severity 1: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdSeverity.{#SNMPINDEX}.1sensorts1[{#SNMPINDEX}]3007d30dSensorsSensorTresholdSeveritySensor threshold severity 2: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdSeverity.{#SNMPINDEX}.2sensorts2[{#SNMPINDEX}]3007d30dSensorsSensorTresholdSeveritySensor threshold severity 3: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdSeverity.{#SNMPINDEX}.3sensorts3[{#SNMPINDEX}]3007d30dSensorsSensorTresholdSeveritySensor threshold severity 4: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdSeverity.{#SNMPINDEX}.4sensorts4[{#SNMPINDEX}]3007d30dSensorsSensorTresholdSeveritySensor threshold value 1: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdValue.{#SNMPINDEX}.1sensortv1[{#SNMPINDEX}]3007d30dFLOATSensorsMULTIPLIER0.1Sensor threshold value 2: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdValue.{#SNMPINDEX}.2sensortv2[{#SNMPINDEX}]3007d30dFLOATSensorsMULTIPLIER0.1Sensor threshold value 3: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdValue.{#SNMPINDEX}.3sensortv3[{#SNMPINDEX}]3007d30dFLOATSensorsMULTIPLIER0.1Sensor threshold value 4: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorThresholdValue.{#SNMPINDEX}.4sensortv4[{#SNMPINDEX}]3007d30dFLOATSensorsMULTIPLIER0.1Sensor value: {#SNMPVALUE}SNMP_AGENTCISCO-ENTITY-SENSOR-MIB::entSensorValue.{#SNMPINDEX}sensorvalue[{#SNMPINDEX}]3007d30dFLOATSensorsMULTIPLIER0.1{delta(#1)}>0.1Sensor {#SNMPVALUE} changed more than 0.1dB!WARNING{delta(#1)}>=1Sensor {#SNMPVALUE} changed more than 1dB!HIGH{Cisco_Sensors:sensorte1[{#SNMPINDEX}].last()}=1
and
{Cisco_Sensors:sensorts1[{#SNMPINDEX}].last()}=20Sensor {#SNMPVALUE} over threshold (alert)HIGH{Cisco_Sensors:sensorte2[{#SNMPINDEX}].last()}=1
and
{Cisco_Sensors:sensorts2[{#SNMPINDEX}].last()}=20Sensor {#SNMPVALUE} over threshold (alert)HIGH{Cisco_Sensors:sensorte3[{#SNMPINDEX}].last()}=1
and
{Cisco_Sensors:sensorts3[{#SNMPINDEX}].last()}=20Sensor {#SNMPVALUE} over threshold (alert)HIGH{Cisco_Sensors:sensorte4[{#SNMPINDEX}].last()}=1
and
{Cisco_Sensors:sensorts4[{#SNMPINDEX}].last()}=20Sensor {#SNMPVALUE} over threshold (alert)HIGH{Cisco_Sensors:sensorte1[{#SNMPINDEX}].last()}=1
and
{Cisco_Sensors:sensorts1[{#SNMPINDEX}].last()}=30Sensor {#SNMPVALUE} over threshold (critical)DISASTER{Cisco_Sensors:sensorte2[{#SNMPINDEX}].last()}=1
and
{Cisco_Sensors:sensorts2[{#SNMPINDEX}].last()}=30Sensor {#SNMPVALUE} over threshold (critical)DISASTER{Cisco_Sensors:sensorte3[{#SNMPINDEX}].last()}=1
and
{Cisco_Sensors:sensorts3[{#SNMPINDEX}].last()}=30Sensor {#SNMPVALUE} over threshold (critical)DISASTER{Cisco_Sensors:sensorte4[{#SNMPINDEX}].last()}=1
and
{Cisco_Sensors:sensorts4[{#SNMPINDEX}].last()}=30Sensor {#SNMPVALUE} over threshold (critical)DISASTER{Cisco_Sensors:sensorte1[{#SNMPINDEX}].last()}=1
and
{Cisco_Sensors:sensorts1[{#SNMPINDEX}].last()}=10Sensor {#SNMPVALUE} over threshold (warning)AVERAGE{Cisco_Sensors:sensorte2[{#SNMPINDEX}].last()}=1
and
{Cisco_Sensors:sensorts2[{#SNMPINDEX}].last()}=10Sensor {#SNMPVALUE} over threshold (warning)AVERAGE{Cisco_Sensors:sensorte3[{#SNMPINDEX}].last()}=1
and
{Cisco_Sensors:sensorts3[{#SNMPINDEX}].last()}=10Sensor {#SNMPVALUE} over threshold (warning)AVERAGE{Cisco_Sensors:sensorte4[{#SNMPINDEX}].last()}=1
and
{Cisco_Sensors:sensorts4[{#SNMPINDEX}].last()}=10Sensor {#SNMPVALUE} over threshold (warning)AVERAGESensor {#SNMPVALUE}1A7C11- Cisco_Sensorssensortv1[{#SNMPINDEX}]
1F63100- Cisco_Sensorssensortv2[{#SNMPINDEX}]
22774A4- Cisco_Sensorssensortv3[{#SNMPINDEX}]
3A54F10- Cisco_Sensorssensortv4[{#SNMPINDEX}]
4BOLD_LINE00CC00- Cisco_Sensorssensorvalue[{#SNMPINDEX}]
{$SNMP_COMMUNITY}publicSensorTresholdEval1true2falseSensorTresholdRel1lessThan2lessOrEqual3greaterThan4greaterOrEqual5equalTo6notEqualToSensorTresholdSeverity1other10minor20major30critical