Module: check_mk
Branch: master
Commit: 1658b7ab1d1c74666dfb431e61bcc33f375d74f4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1658b7ab1d1c74…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Nov 18 14:50:00 2015 +0100
#2796 FIX apc_symetra_ext_temp: now supports temperatures measured in fahrenheit
---
.werks/2796 | 9 +++++++++
ChangeLog | 1 +
checks/apc_symmetra_ext_temp | 7 ++++---
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.werks/2796 b/.werks/2796
new file mode 100644
index 0000000..8b795d4
--- /dev/null
+++ b/.werks/2796
@@ -0,0 +1,9 @@
+Title: apc_symetra_ext_temp: now supports temperatures measured in fahrenheit
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1447854523
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 4b1a1f6..a9da207 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -88,6 +88,7 @@
* 2790 FIX: check_dns: now able to configure milliseconds as expected response
time...
* 2794 FIX: The encoding parameter set in the agent sections was not working...
* 2712 FIX: winperf_processor: this check no longer requires multiple check cycles
before counters are initialized
+ * 2796 FIX: apc_symetra_ext_temp: now supports temperatures measured in fahrenheit
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/apc_symmetra_ext_temp b/checks/apc_symmetra_ext_temp
index d27adf5..3e07c0b 100644
--- a/checks/apc_symmetra_ext_temp
+++ b/checks/apc_symmetra_ext_temp
@@ -31,9 +31,10 @@ def inventory_apc_symmetra_ext_temp(info):
for line in info if line[1] == "2" ]
def check_apc_symmetra_ext_temp(item, params, info):
- for index, status, temp in info:
+ for index, status, temp, temp_unit in info:
if item == index:
- return check_temperature(int(temp), params)
+ unit = temp_unit == "2" and "f" or "c"
+ return check_temperature(int(temp), params, dev_unit = unit)
return 3, "Sensor not found in SNMP data"
@@ -42,7 +43,7 @@ check_info["apc_symmetra_ext_temp"] = {
'inventory_function': inventory_apc_symmetra_ext_temp,
'service_description': 'Temperature External %s',
'has_perfdata': True,
- 'snmp_info': ('.1.3.6.1.4.1.318.1.1.10.2.3.2.1', [1, 3,
4]),
+ 'snmp_info': ('.1.3.6.1.4.1.318.1.1.10.2.3.2.1', [1, 3,
4, 5]),
'snmp_scan_function': lambda oid:
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.318.1.3"),
'group': 'room_temperature',
'includes': [ 'temperature.include' ],