Module: check_mk
Branch: master
Commit: 80e5b8b0799e96b62cbcd080119888a31b8afe82
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=80e5b8b0799e96…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Nov 16 08:24:01 2016 +0100
adapted discovery function
---
checks/netgear_fans | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/checks/netgear_fans b/checks/netgear_fans
index 430ebed..d266f0f 100644
--- a/checks/netgear_fans
+++ b/checks/netgear_fans
@@ -69,8 +69,10 @@ def parse_netgear_fans(info):
def inventory_netgear_fans(parsed):
- return [ (sensorname, {}) for sensorname, sensorinfo in parsed.items()
- if sensorinfo["state"] not in [ "1" ] ]
+ for sensorname, sensorinfo in parsed.items():
+ state = sensorinfo["state"]
+ if state != "1" and not ( state == "2" and
sensorinfo["reading"] == 0 ):
+ yield sensorname, {}
def check_netgear_fans(item, params, parsed):