Module: check_mk
Branch: master
Commit: 5fea245c97e0c6d4ad8ae8f569fc0d90f1100f41
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5fea245c97e0c6…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue May 26 14:20:33 2015 +0200
hitachi_hus_status: Fixed case of OK
---
checks/hitachi_hus_status | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/checks/hitachi_hus_status b/checks/hitachi_hus_status
index 03e6096..8763928 100644
--- a/checks/hitachi_hus_status
+++ b/checks/hitachi_hus_status
@@ -30,7 +30,7 @@ def inventory_hitatchi_hus_status(info):
def check_hitatchi_hus_status(_no_item, _no_params, info):
status_values = {
- 0 : ( 0, "Array in normal status" ),
+ 0 : ( 0, "Array in normal status" ),
1 : ( 2, "Drive blocked" ),
2 : ( 2, "Spare drive blockade" ),
4 : ( 2, "Data drive blockade" ),
@@ -52,8 +52,12 @@ def check_hitatchi_hus_status(_no_item, _no_params, info):
for status, output in status_values.items():
state, message = output
+ found_error = False
if status & int(info[0][0]):
+ found_error = True
yield state, message
+ if found_error:
+ yield 0, "Array in normal status"
check_info["hitatchi_hus_status"] = {
"check_function" : check_hitatchi_hus_status,