Module: check_mk
Branch: master
Commit: 30cc8b9f25cd2fd73651226f294c7945f2f70966
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=30cc8b9f25cd2f…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Dec 11 10:52:05 2015 +0100
#2885 cisco_hsrp: now reports the HSRP state
This check now reports the HSRP state in every case. The states can be
'initial', 'learn', 'listen', 'speak', 'standby'
and 'active'.
---
.werks/2885 | 10 ++++++++++
ChangeLog | 1 +
checks/cisco_hsrp | 6 +++---
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.werks/2885 b/.werks/2885
new file mode 100644
index 0000000..4c5e1d9
--- /dev/null
+++ b/.werks/2885
@@ -0,0 +1,10 @@
+Title: cisco_hsrp: now reports the HSRP state
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1449827357
+Class: feature
+
+This check now reports the HSRP state in every case. The states can be
+'initial', 'learn', 'listen', 'speak', 'standby'
and 'active'.
diff --git a/ChangeLog b/ChangeLog
index 06a123e..4f8ba5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -62,6 +62,7 @@
* 2869 ibm_storage_ts, ibm_storage_ts.drive, ibm_storage_ts_library,
ibm_storage_ts.status: new checks for IBM TS3100 Tape Library
* 1316 mysql_slave: Levels can now be configured with WATO
* 2809 netscaler_vserver: now reports health_perc as performance data
+ * 2885 cisco_hsrp: now reports the HSRP state...
* 2660 FIX: fixed windows agent using the wrong working directory...
* 2664 FIX: ps: Speedup in situation with many matching processes...
* 2661 FIX: windows agent: fixed incomplete process list...
diff --git a/checks/cisco_hsrp b/checks/cisco_hsrp
index 4d32331..48fb83d 100644
--- a/checks/cisco_hsrp
+++ b/checks/cisco_hsrp
@@ -121,11 +121,11 @@ def check_cisco_hsrp(item, params, info):
# anything else must be a non-operative state already
else:
state = 2
- msgtxt = "Redundancy Group %s has status %s" % ( hsrp_grp,
hsrp_states[hsrp_state])
+ msgtxt = "Redundancy Group %s" % hsrp_grp
- return (state, msgtxt)
+ return state, "%s, Status: %s" % (msgtxt,
hsrp_states.get(hsrp_state, "unknown"))
- return (3, "HSRP Group not found in Agent output" )
+ return 3, "HSRP Group not found in Agent output"