Module: check_mk
Branch: master
Commit: 92e7057b2128d1f469a52f008dee515ca58e3c3e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=92e7057b2128d1…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Thu Nov 20 14:56:49 2014 +0100
cisco_asa_failover: Check now can deal with more status codes
---
checks/cisco_asa_failover | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/checks/cisco_asa_failover b/checks/cisco_asa_failover
index a080f6e..9a4222e 100644
--- a/checks/cisco_asa_failover
+++ b/checks/cisco_asa_failover
@@ -46,12 +46,22 @@ def inventory_cisco_asa_failover(info):
if "this device" in deviceentry[0]:
# Return the Cluster role ID of the device.
return [ (None, int(info[1][1])) ]
- return []
def check_cisco_asa_failover(item, params, info):
- asa_state_names = { 9: "active", 10 : "standby" }
+ asa_state_names = {
+ 1 : "other",
+ 2 : "up",
+ 3 : "down",
+ 4 : "error",
+ 5 : "overTemp",
+ 6 : "busy",
+ 7 : "noMedia",
+ 8 : "backup",
+ 9 : "active",
+ 10 : "standby",
+ }
for deviceentry in info[-2:]:
@@ -77,9 +87,6 @@ def check_cisco_asa_failover(item, params, info):
return (state, msgtxt)
- return (3, "Data not in SNMP output")
-
-
check_info["cisco_asa_failover"] = {
"check_function" : check_cisco_asa_failover,
"inventory_function" : inventory_cisco_asa_failover,