Module: check_mk
Branch: master
Commit: 735267d7711b4873c28d1c3a37437dd27e3c2407
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=735267d7711b48…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Jul 3 16:59:47 2014 +0200
hp_proliant_power: fixed inventory on not supported devices
---
checks/hp_proliant_power | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/checks/hp_proliant_power b/checks/hp_proliant_power
index f4cf877..62eed56 100755
--- a/checks/hp_proliant_power
+++ b/checks/hp_proliant_power
@@ -27,7 +27,7 @@
hp_prolaint_power_default_levels = ( 300, 400 )
def inventory_hp_proliant_power(info):
- if len(info) > 0:
+ if len(info) > 0 and info[0][0] != '0':
return [ ( None, 'hp_prolaint_power_default_levels') ]
def check_hp_proliant_power(item, params, info):
@@ -35,7 +35,7 @@ def check_hp_proliant_power(item, params, info):
1 : "other",
3 : "absent",
}
- status, reading = map(saveint, info[0])
+ status, reading = map(int, info[0])
if status != 2:
return 2, "Power Meter state: %s" % ( status_table[status] )
warn, crit = params