Module: check_mk
Branch: master
Commit: 70f9c48ce484ad4184bd30d43369dd785be47c88
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=70f9c48ce484ad…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Mar 13 13:42:33 2017 +0100
4520 FIX avaya_45xx_temp: Fixed wrong temperature unit and value handling
Change-Id: I70b4a0498ebcd0babf555de4f916c55afd3dfa7f
---
.werks/4520 | 11 +++++++++++
checks/avaya_45xx_temp | 12 ++++++++----
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/.werks/4520 b/.werks/4520
new file mode 100644
index 0000000..6d4495b
--- /dev/null
+++ b/.werks/4520
@@ -0,0 +1,11 @@
+Title: avaya_45xx_temp: Fixed wrong temperature unit and value handling
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.4.0b4
+Date: 1489408727
+
+
diff --git a/checks/avaya_45xx_temp b/checks/avaya_45xx_temp
index 6ccb47d..0ddd0de 100644
--- a/checks/avaya_45xx_temp
+++ b/checks/avaya_45xx_temp
@@ -36,8 +36,8 @@ def inventory_avaya_45xx_temp(info):
def check_avaya_45xx_temp(item, params, info):
for idx, temp in enumerate(info):
if str(idx) == item:
- return check_temperature(int(temp[0]), params,
- "avaya_45xx_temp_%s" % item, dev_unit =
"f")
+ return check_temperature(float(temp[0])/2.0, params,
+ "avaya_45xx_temp_%s" % item)
check_info["avaya_45xx_temp"] = {
"check_function": check_avaya_45xx_temp,
@@ -46,8 +46,12 @@ check_info["avaya_45xx_temp"] = {
"default_levels_variable":
"avaya_45xx_temp_temp_default_levels",
"has_perfdata": True,
"group": "temperature",
- # S5-CHASSIS-MIB
- "snmp_info": ( ".1.3.6.1.4.1.45.1.6.3.7.1.1.5", [ 5 ]
), # Temperature in Fahrenheit
+ # S5-CHASSIS-MIB::s5ChasTmpSnrTmpValue
+ # The current temperature value of the temperature
+ # sensor. This is measured in units of a half degree
+ # centigrade, e.g. a value of 121 indicates a temperature
+ # of 60.5 degrees C.
+ "snmp_info": ( ".1.3.6.1.4.1.45.1.6.3.7.1.1.5", [ 5 ]
),
"snmp_scan_function": lambda oid: ".1.3.6.1.4.1.45.3" in
oid(".1.3.6.1.2.1.1.2.0"),
"includes": [ "temperature.include" ],
}