Module: check_mk
Branch: master
Commit: 351bb6d0dc40ad52ba6fed76242bfe83889c770d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=351bb6d0dc40ad…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Oct 17 12:53:07 2013 +0200
FIX: hp_proliant: Correct handling of missing snmp data
---
ChangeLog | 1 +
checks/hp_proliant | 2 ++
2 files changed, 3 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 2b4db02..3b0168d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,7 @@
* FIX: esx_vsphere_counters: added missing ramdisk type upgradescratch
* FIX: esx_vsphere_hostsystem: fixed bug in handling of params
* FIX: local: tolerate invalid output lines
+ * FIX: hp_proliant: Correct handling of missing snmp data
WATO:
* You can now have site-specific global settings when using
diff --git a/checks/hp_proliant b/checks/hp_proliant
index 1d9a49a..417354c 100644
--- a/checks/hp_proliant
+++ b/checks/hp_proliant
@@ -37,6 +37,8 @@ def inventory_proliant_general(info):
return [ (None, None) ]
def check_proliant_general(item, no_params, info):
+ if not info:
+ return 3, "status not found in snmp data"
snmp_state = hp_proliant_general_status_map[int(info[0][0])]
status = hp_proliant_general_status2nagios_map[snmp_state]
return (status, "General Status is %s (Firmware: %s, S/N: %s)" %