Module: check_mk
Branch: master
Commit: 60c94490c72d7def3a487fb68ef2be2406b2e5fd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=60c94490c72d7d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Aug 4 10:13:36 2015 +0200
cisco_temperature: Added some useful comments
---
checks/cisco_temperature | 36 ++++++++++++++++++++++++++++++------
1 file changed, 30 insertions(+), 6 deletions(-)
diff --git a/checks/cisco_temperature b/checks/cisco_temperature
index 699c1fb..dc6ad6f 100644
--- a/checks/cisco_temperature
+++ b/checks/cisco_temperature
@@ -29,6 +29,30 @@
# have been observed to display a tenth of the actual temperature value.
# A firmware update on the device fixes this.
+# CISCO-ENTITY-SENSOR-MIB::entSensorScale
+# 1:yocto
+# 2:zepto
+# 3:atto
+# 4:femto
+# 5:pico
+# 6:nano
+# 7:micro
+# 8:milli
+# 9:units
+# 10:kilo
+# 11:mega
+# 12:giga
+# 13:tera
+# 14:exa
+# 15:peta
+# 16:zetta
+# 17:yotta
+#
+# CISCO-ENTITY-SENSOR-MIB::entSensorStatus
+# 1:ok
+# 2:unavailable
+# 3:nonoperational
+
def parse_cisco_temperature(info):
description_info, state_info, levels_info, perfstuff = info
@@ -53,7 +77,7 @@ def parse_cisco_temperature(info):
descr = descriptions[sensor_id]
else:
descr = sensor_id
- if descr and sensortype == '8':
+ if descr and sensortype == '8': # only care about temperature sensors
if sensorstate == '2':
entity_parsed[descr] = (3, "Data from sensor currently not
available")
@@ -155,11 +179,11 @@ check_info['cisco_temperature'] = {
# Type and current state
( ".1.3.6.1.4.1.9.9.91.1.1.1.1", [
OID_END,
- 1, # Type (see above), 8 = Celsius, 12 = truth value
- 2, # scalecode, 8 == milli
- 3, # Precision
- 4, # Most recent measurement
- 5, # Status of the sensor 1 == ok, 2 == cannot report, 3
== broken
+ 1, # CISCO-ENTITY-SENSOR-MIB::entSensorType
+ 2, # CISCO-ENTITY-SENSOR-MIB::entSensorScale
+ 3, # CISCO-ENTITY-SENSOR-MIB::entSensorPrecision
+ 4, # CISCO-ENTITY-SENSOR-MIB::entSensorValue
+ 5, # CISCO-ENTITY-SENSOR-MIB::entSensorStatus
]),
# Threshold