Module: check_mk
Branch: master
Commit: ac9c1b2990a40b59361a1603f2397de22ebe653e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ac9c1b2990a40b…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Fri Sep 7 13:21:56 2018 +0200
FEED-980: Added more possible states to synology_raid
Change-Id: I87a85978526eaa10a177e7631ff5aa425d689c7e
---
checks/synology_raid | 36 ++++++++++++++++++++++--------------
1 file changed, 22 insertions(+), 14 deletions(-)
diff --git a/checks/synology_raid b/checks/synology_raid
index 6ccf514..072e26c 100644
--- a/checks/synology_raid
+++ b/checks/synology_raid
@@ -30,22 +30,30 @@ def inventory_synology_raid(info):
def check_synology_raid(item, _no_params, info):
states = {
- 1 : ("OK" ,0),
- 2 : ("repairing" ,1),
- 3 : ("migrating" ,1),
- 4 : ("expanding" ,1),
- 5 : ("deleting" ,1),
- 6 : ("creating" ,1),
- 7 : ("RAID syncing" ,0),
- 8 : ("RAID parity checking" ,0),
- 9 : ("RAID assembling" ,1),
- 10 : ("cancelling" ,1),
- 11 : ("degraded" ,2),
- 12 : ("crashed" ,2),
+ "1" : ("OK" ,0),
+ "2" : ("repairing" ,1),
+ "3" : ("migrating" ,1),
+ "4" : ("expanding" ,1),
+ "5" : ("deleting" ,1),
+ "6" : ("creating" ,1),
+ "7" : ("RAID syncing" ,0),
+ "8" : ("RAID parity checking" ,0),
+ "9" : ("RAID assembling" ,1),
+ "10" : ("cancelling" ,1),
+ "11" : ("degraded" ,2),
+ "12" : ("crashed" ,2),
+ "13" : ("scrubbing" ,0),
+ "14" : ("RAID deploying" ,0),
+ "15" : ("RAID undeploying" ,0),
+ "16" : ("RAID mounting cache" ,0),
+ "17" : ("RAID unmounting cache" ,0),
+ "18" : ("RAID continue expanding" ,1),
+ "19" : ("RAID converting" ,0),
+ "20" : ("RAID migrating" ,0),
+ "21" : ("RAID status unknown" ,3),
}
- for raid, status in info:
+ for raid, state in info:
if raid == item:
- state = int(status)
message = "Status: " + states[state][0]
return states[state][1], message