Module: check_mk
Branch: master
Commit: ab08b3e80f3593741bb0b8103f521aee0b67958d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ab08b3e80f3593…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Aug 9 10:06:00 2011 +0200
FIX: cisco_temp: skip non-present sensors at inventory
Thanks to Ulrich Kiermayr
---
ChangeLog | 1 +
checkman/cisco_temp | 3 ++-
checks/cisco_temp | 8 ++------
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b54b9ea..9e96489 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
Nagios user needs write access in precompiled directory!
Checks & Agents:
+ * FIX: cisco_temp: skip non-present sensors at inventory
* FIX: apc_symmetra: fix remaining runtime calculation (by factor 100)
* FIX: Added PNP-template for winperf_phydisk
* FIX: if64: fix UNKNOWN in case of non-unique ifAlias
diff --git a/checkman/cisco_temp b/checkman/cisco_temp
index 007bf4d..ead1c8e 100644
--- a/checkman/cisco_temp
+++ b/checkman/cisco_temp
@@ -20,4 +20,5 @@ item:
the device.
inventory:
- One check for each sensor is created by the inventory.
+ One check for each sensor is created by the inventory, if the
+ sensor is not in state {5} (not present).
diff --git a/checks/cisco_temp b/checks/cisco_temp
index 5232e4e..f068db5 100644
--- a/checks/cisco_temp
+++ b/checks/cisco_temp
@@ -51,12 +51,8 @@
def inventory_cisco_temp(checktyp, info):
- # inventory = []
- # for name, state in info:
- # inventory.append( (name, None) )
- # return inventory
-
- return [ (name, None) for (name, state) in info ]
+ # Skip sensors with state 5 (not present)
+ return [ (name, None) for (name, state) in info if state != '5' ]
def check_cisco_temp(item, params, info):
for name, state in info: