Module: check_mk
Branch: master
Commit: a613b10b8fa8bca3963596c8820dc5b167be5823
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a613b10b8fa8bc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 3 19:09:52 2014 +0100
#1618 FIX ad_replication: Output of timeLastSuccess and timeLastFailure was inverted
Thanks to Andreas Döhler for providing the patch.
---
.werks/1618 | 9 +++++++++
ChangeLog | 1 +
checks/ad_replication | 12 ++++++------
3 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/.werks/1618 b/.werks/1618
new file mode 100644
index 0000000..7c32141
--- /dev/null
+++ b/.werks/1618
@@ -0,0 +1,9 @@
+Title: ad_replication: Output of timeLastSuccess and timeLastFailure was inverted
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417630130
+Class: fix
+
+Thanks to Andreas Döhler for providing the patch.
diff --git a/ChangeLog b/ChangeLog
index 7dbc13e..4dabc1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -79,6 +79,7 @@
* 1571 FIX: check_mk_agent.linux: fix output of lnx_if on Ubuntu 8.04 (on older
kernels), repairs tcp_conn_stats...
* 1622 FIX: megaraid_bbu: handle case isSOHGood and consider it as critical...
* 1617 FIX: lnx_if: Deal with data provided by cluster host
+ * 1618 FIX: ad_replication: Output of timeLastSuccess and timeLastFailure was
inverted...
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
diff --git a/checks/ad_replication b/checks/ad_replication
index bc98b0c..ac429fd 100644
--- a/checks/ad_replication
+++ b/checks/ad_replication
@@ -84,24 +84,24 @@ def check_ad_replication(item, params, info):
output += '(!) %s/%s replication of context %s reached ' \
' the threshold of maximum failures (%s) (Last Success: %s,
' \
'LastFailure: %s NumFailures: %s Status: %s), ' % \
- (sourceSite, sourceDC, namingContext, maxFailuresWarn,
timeLastFailure,
- timeLastSuccess, numFailures, statusLastFailure)
+ (sourceSite, sourceDC, namingContext, maxFailuresWarn,
timeLastSuccess,
+ timeLastFailure, numFailures, statusLastFailure)
if int(numFailures) > maxFailuresCrit:
status = 2
output += '(!!) %s/%s replication of context %s reached ' \
' the threshold of maximum failures (%s) (Last Success: %s,
' \
'LastFailure: %s NumFailures: %s Status: %s), ' % \
- (sourceSite, sourceDC, namingContext, maxFailuresCrit,
timeLastFailure,
- timeLastSuccess, numFailures, statusLastFailure)
+ (sourceSite, sourceDC, namingContext, maxFailuresCrit,
timeLastSuccess,
+ timeLastFailure, numFailures, statusLastFailure)
if timeLastFailure is not None and timeLastSuccess is not None \
and timeLastFailure > timeLastSuccess:
status = 2
output += '(!!) %s/%s replication of context %s failed ' \
'(Last Success: %s, LastFailure: %s NumFailures: %s Status:
%s), ' % \
- (sourceSite, sourceDC, namingContext, timeLastFailure,
- timeLastSuccess, numFailures, statusLastFailure)
+ (sourceSite, sourceDC, namingContext, timeLastSuccess,
+ timeLastFailure, numFailures, statusLastFailure)
if not foundLine:
return (3, 'Replication information for %s not found' % item)