Module: check_mk
Branch: master
Commit: d1c34e1304471d1c63dbaaf62fea1425136235d8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d1c34e1304471d…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Apr 18 10:54:43 2013 +0200
cisco_hsrp: fixed problem when HSRP groups had same ip address
---
ChangeLog | 1 +
checks/cisco_hsrp | 17 +++++++++++------
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a390aad..9047e85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -72,6 +72,7 @@
* cpu_util.include: fixed bug when params are set to None
* predictive levels: fixed bug when existing predictive levels get new options
* windows_plugin mssql.vbs: No longer queries stopped mssql instances
+ * cisco_hsrp: fixed problem when HSRP groups had same ip address
Notifications:
* notify.py: unique spoolfiles name no longer created with uuid
diff --git a/checks/cisco_hsrp b/checks/cisco_hsrp
index 11d9c90..aa4aff1 100644
--- a/checks/cisco_hsrp
+++ b/checks/cisco_hsrp
@@ -75,7 +75,6 @@ hsrp_states = { 1: "initial", 2: "learn", 3: "listen", 4: "speak", 5: "standby",
def inventory_cisco_hsrp(info):
-
inventory = []
for line in info:
hsrp_grp_entry, vip, actrouter, sbrouter, hsrp_state, vmac = line
@@ -84,7 +83,8 @@ def inventory_cisco_hsrp(info):
# if the group is in a working state (both routers see and talk to each other),
# inventorize HSRP group name+IP and the standby state as seen from "this" box.
if hsrp_state in [ 5, 6 ]:
- inventory.append( (vip, (hsrp_grp, hsrp_state)) )
+ vip_grp = "%s-%s" % ( vip, hsrp_grp )
+ inventory.append( (vip_grp, (hsrp_grp, hsrp_state)) )
return inventory
@@ -98,17 +98,22 @@ def check_cisco_hsrp(item, params, info):
interface_index, hsrp_grp = hsrp_grp_entry.split(".")
hsrp_state = int(hsrp_state)
- if vip == item:
+ if "-" in item:
+ vip_grp = "%s-%s" % ( vip, hsrp_grp )
+ else:
+ vip_grp = vip
+
+ if vip_grp == item:
# FIXME: This should be shorter.
# Validate that we the inventorized state is a "good one"
# if it's also the one we have now, then we're fine.
if hsrp_state_wanted == 5 and hsrp_state == hsrp_state_wanted:
state = 0
- msgtxt = "Redundancy Group %s is OK" % hsrp_grp
+ msgtxt = "Redundancy Group %s is OK" % vip_grp
elif hsrp_state_wanted == 6 and hsrp_state == hsrp_state_wanted:
state = 0
- msgtxt = "Redundancy Group %s is OK" % hsrp_grp
+ msgtxt = "Redundancy Group %s is OK" % vip_grp
# otherwise if it's a good one, but flipped, then we are in a failover
elif hsrp_state == 5 or hsrp_state == 6:
state = 1
@@ -120,7 +125,7 @@ def check_cisco_hsrp(item, params, info):
return (state, msgtxt)
- return (3, "HSRP Group %s not found in Agent output" % hsrp_grp_wanted )
+ return (3, "HSRP Group not found in Agent output" )
Module: check_mk
Branch: master
Commit: 074d8381581a894e2e527dd2160ca3e11569365d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=074d8381581a89…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 17 16:15:27 2013 +0200
FIX: fix bug where certain settings where not saved on IE.
---
ChangeLog | 4 ++++
web/htdocs/js/checkmk.js | 1 +
2 files changed, 5 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index deeb54a..a390aad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -119,6 +119,10 @@
WATO:
* Improved handling of valuespec validations in WATO rule editor. Displaying a
warning message when going to throw away the current settings.
+ * FIX: fix bug where certain settings where not saved on IE. This was mainly
+ on IE7, but also IE8,9,10 in IE7 mode (which is often active). Affected
+ was e.g. the nodes of a cluster or the list of services for service
+ inventory
1.2.2:
Core:
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index 46d5cae..5d03edf 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -1568,6 +1568,7 @@ function list_of_strings_extend(oInput, j) {
oNewDiv.innerHTML = oDiv.innerHTML.replace('"' + oldName + '"', '"' + newName + '"');
// IE7 does not have quotes in innerHTML, trying to workaround this here.
oNewDiv.innerHTML = oNewDiv.innerHTML.replace('=' + oldName + ' ', '=' + newName + ' ');
+ oNewDiv.innerHTML = oNewDiv.innerHTML.replace('=' + oldName + '>', '=' + newName + '>');
oContainer.appendChild(oNewDiv);
/* Move focus function from old last to new last input field */