Module: check_mk
Branch: master
Commit: bbf614673d5267ca88791a6690e64cbdc856b8c0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bbf614673d5267…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Jul 21 10:31:38 2014 +0200
FIX ad_replication.bat: does not return data if the server is no DC
---
.werks/1083 | 8 ++++++++
ChangeLog | 1 +
agents/windows/plugins/ad_replication.bat | 8 +++++---
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.werks/1083 b/.werks/1083
new file mode 100644
index 0000000..3fd5727
--- /dev/null
+++ b/.werks/1083
@@ -0,0 +1,8 @@
+Title: ad_replication.bat: does not return data if the server is no DC
+Level: 1
+Component: checks
+Version: 1.2.5i5
+Date: 1405931445
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index dda3d7b..f49c69a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -57,6 +57,7 @@
* 0634 FIX: Max Bandwidth for PNP-Graphs of Interface checks corrected...
* 0635 FIX: fc_port: the check no longer inventorizes ports with administrative state
of 'unknown' or 'offline'
* 0636 FIX: fc_port: do not inventorize if brocade fibre channel mib is also
supported on the device...
+ * 1083 FIX: ad_replication.bat: does not return data if the server is no DC
Multisite:
* 1013 Sort host names naturally, e.g. foobar11 comes after foobar2...
diff --git a/agents/windows/plugins/ad_replication.bat
b/agents/windows/plugins/ad_replication.bat
index c4ce3c4..af04d5f 100644
--- a/agents/windows/plugins/ad_replication.bat
+++ b/agents/windows/plugins/ad_replication.bat
@@ -9,11 +9,13 @@ REM * credentials which are not enough for this check.
REM *
REM * To solve this problem you can do e.g. the following:
REM *
-REM * - Change the account the service is being started with to a
+REM * - Change the account the service is being started with to a
REM * domain user account with enough permissions on the DC.
-REM *
+REM *
REM ***
echo ^<^<^<ad_replication^>^>^>
dsquery server | find /I "CN=%COMPUTERNAME%," > nul
-if ERRORLEVEL 0 repadmin /showrepl /csv
+if ERRORLEVEL 1 goto SERVER_NOT_IN_DC_LIST
+repadmin /showrepl /csv
+:SERVER_NOT_IN_DC_LIST