Module: check_mk
Branch: master
Commit: dd947bcf85d2144f1f980039b45badb4f561869b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dd947bcf85d214…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Wed Oct 15 17:04:13 2014 +0200
decru_temps: Now uses Fahrenheit conversion from temperature.include
---
checks/decru_temps | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/checks/decru_temps b/checks/decru_temps
index ac6b93e..0980762 100644
--- a/checks/decru_temps
+++ b/checks/decru_temps
@@ -25,18 +25,15 @@
# Boston, MA 02110-1301 USA.
def inventory_decru_temps(info):
- return [ (l[0], (int(to_celsius(int(l[1]))) + 4.0,
- int(to_celsius(int(l[1]))) + 8.0 ) ) for l in info ]
+ return [ (l[0], (int(fahrenheit_to_celsius(int(l[1]))) + 4.0,
+ int(fahrenheit_to_celsius(int(l[1]))) + 8.0 ) ) for l in info ]
def check_decru_temps(item, params, info):
for name, rawtemp in info:
if name == item:
- temp = to_celsius(int(rawtemp))
+ temp = fahrenheit_to_celsius(int(rawtemp))
return check_temperature(temp, params)
- return 3, "Sensor not found in SNMP data"
-
-
check_info["decru_temps"] = {
'check_function': check_decru_temps,