Module: check_mk
Branch: master
Commit: 6df18597a1721efb5d55f2ec8d7841a613586d3f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6df18597a1721e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Sep 24 10:46:13 2014 +0200
decru_datafort: minor cleanup
---
checks/decru_fans | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/checks/decru_fans b/checks/decru_fans
index 9f14dd2..695fd8a 100644
--- a/checks/decru_fans
+++ b/checks/decru_fans
@@ -27,18 +27,18 @@
decru_fan_default_levels = (8000, 8400)
def inventory_decru_fans(info):
- return [ (l[0], l[1] + " RPM", "decru_fan_default_levels") for l
in info ]
+ return [ (l[0], "decru_fan_default_levels") for l in info ]
def check_decru_fans(item, params, info):
- for fan in info:
- if fan[0] == item:
- rpm = int(fan[1])
+ for fan_name, rpm in info:
+ if fan_name == item:
+ rpm = int(rpm)
crit, warn = params
- perfdata = [("rpm", rpm, 0, "", warn, crit)]
+ perfdata = [("rpm", rpm, 0, None, warn, crit)]
infotxt = "%d RPM" % rpm
- if rpm < crit:
+ if rpm <= crit:
return (2, infotxt, perfdata)
- elif rpm < warn:
+ elif rpm <= warn:
return (1, infotxt, perfdata)
else:
return (0, infotxt, perfdata)