Module: check_mk
Branch: master
Commit: 5ee509ac50adfd298e5cd2c4f56c42aa57a07817
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5ee509ac50adfd…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Jul 7 09:59:38 2015 +0200
#1264 FIX ad_replication: Fixed handling of agent output without Destination DC entry
---
.werks/1264 | 10 ++++++++++
ChangeLog | 1 +
checks/ad_replication | 19 +++++++++++++++----
3 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/.werks/1264 b/.werks/1264
new file mode 100644
index 0000000..9640fa1
--- /dev/null
+++ b/.werks/1264
@@ -0,0 +1,10 @@
+Title: ad_replication: Fixed handling of agent output without Destination DC entry
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1436255904
+
+
diff --git a/ChangeLog b/ChangeLog
index 3827b52..4bcd8bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,7 @@
* 2321 FIX: process discovery: fixed exception during service discovery when no
explicit process matching was set...
* 2394 FIX: megaraid_ldisks: Is now supporting LSI CacheCade drives
* 2449 FIX: db2_mem: Fixed scaling of perfdata...
+ * 1264 FIX: ad_replication: Fixed handling of agent output without Destination DC
entry
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/checks/ad_replication b/checks/ad_replication
index ac429fd..c89a740 100644
--- a/checks/ad_replication
+++ b/checks/ad_replication
@@ -55,7 +55,13 @@ def parse_ad_replication_info(info):
def inventory_ad_replication(info):
inv = []
for line in parse_ad_replication_info(info):
- entry = ('%s/%s' % (line[4], line[5]),
'ad_replication_default_params')
+ if len(line) == 11:
+ sourceSite = line[4]
+ sourceDC = line[5]
+ elif len(line) == 10:
+ sourceSite = line[3]
+ sourceDC = line[4]
+ entry = ('%s/%s' % (sourceSite, sourceDC),
'ad_replication_default_params')
if line[0] == 'showrepl_INFO' and entry not in inv:
inv.append(entry)
return inv
@@ -67,9 +73,14 @@ def check_ad_replication(item, params, info):
foundLine = False
for l in parse_ad_replication_info(info):
- (lineType, destSite, destDC, namingContext, sourceSite, sourceDC,
- transport, numFailures, timeLastFailure, timeLastSuccess,
- statusLastFailure ) = l
+ if len(l) == 11:
+ (lineType, destSite, destDC, namingContext, sourceSite, sourceDC,
+ transport, numFailures, timeLastFailure, timeLastSuccess,
+ statusLastFailure ) = l
+ elif len(l) == 10:
+ (lineType, destSite, namingContext, sourceSite, sourceDC,
+ transport, numFailures, timeLastFailure, timeLastSuccess,
+ statusLastFailure ) = l
if lineType == 'showrepl_INFO' and sourceSite+'/'+sourceDC ==
item:
foundLine = True