Benjamin Renard commited on 2013-12-18 17:54:51
Showing 2 changed files, with 99 additions and 1 deletions.
| ... | ... |
@@ -0,0 +1,90 @@ |
| 1 |
+Script to check LDAP syncrepl replication state between two servers |
|
| 2 |
+=================================================================== |
|
| 3 |
+ |
|
| 4 |
+This script check LDAP syncrepl replication state between two servers. |
|
| 5 |
+One server is consider as provider and the other as consumer. |
|
| 6 |
+ |
|
| 7 |
+This script can check replication state with two method : |
|
| 8 |
+ - by the fisrt, entryCSN of all entries of LDAP directory will be |
|
| 9 |
+ compare between two servers |
|
| 10 |
+ - by the second, all values of all atributes of all entries will |
|
| 11 |
+ be compare between two servers. |
|
| 12 |
+ |
|
| 13 |
+In all case, contextCSN of servers will be compare and entries not |
|
| 14 |
+present in consumer or in provider will be notice. You can decide to |
|
| 15 |
+disable contextCSN verification by using argument --no-check-contextCSN. |
|
| 16 |
+ |
|
| 17 |
+This script is also able to "touch" LDAP object on provider to force |
|
| 18 |
+synchronisation of this object. This mechanism consist to add '%%TOUCH%%' |
|
| 19 |
+value to an attribute of this object and remove it just after. The |
|
| 20 |
+touched attribute is specify by parameter --touch. Of course, couple of |
|
| 21 |
+DN and password provided, must have write right on this attribute. |
|
| 22 |
+ |
|
| 23 |
+To use this script as Nagios plugin, use -n argument |
|
| 24 |
+ |
|
| 25 |
+Requirement |
|
| 26 |
+----------- |
|
| 27 |
+ |
|
| 28 |
+A single couple of DN and password able to connect to both server |
|
| 29 |
+and without restriction to retrieve objects from servers. |
|
| 30 |
+ |
|
| 31 |
+Usage |
|
| 32 |
+----- |
|
| 33 |
+ |
|
| 34 |
+ Usage: check_syncrepl_extended [options] |
|
| 35 |
+ |
|
| 36 |
+ Options: |
|
| 37 |
+ --version show program's version number and exit |
|
| 38 |
+ -h, --help show this help message and exit |
|
| 39 |
+ -p PROVIDER, --provider=PROVIDER |
|
| 40 |
+ LDAP provider URI (example : |
|
| 41 |
+ ldaps://ldapmaster.foo:636) |
|
| 42 |
+ -c CONSUMER, --consumer=CONSUMER |
|
| 43 |
+ LDAP consumer URI (example : |
|
| 44 |
+ ldaps://ldapslave.foo:636) |
|
| 45 |
+ -D DN, --dn=DN LDAP bind DN (example : |
|
| 46 |
+ uid=nagios,ou=sysaccounts,o=example |
|
| 47 |
+ -P PWD, --pwd=PWD LDAP bind password |
|
| 48 |
+ -b BASEDN, --basedn=BASEDN |
|
| 49 |
+ LDAP base DN (example : o=example) |
|
| 50 |
+ -f FILTER, --filter=FILTER |
|
| 51 |
+ LDAP filter (default : (objectClass=*)) |
|
| 52 |
+ -d, --debug Debug mode |
|
| 53 |
+ -n, --nagios Nagios check plugin mode |
|
| 54 |
+ -q, --quiet Quiet mode |
|
| 55 |
+ --no-check-certificate |
|
| 56 |
+ Don't check the server certificate (Default : False) |
|
| 57 |
+ --no-check-contextCSN |
|
| 58 |
+ Don't check servers contextCSN (Default : False) |
|
| 59 |
+ -a, --attributes Check attributes values (Default : check only |
|
| 60 |
+ entryCSN) |
|
| 61 |
+ --exclude-attributes=EXCL_ATTRS |
|
| 62 |
+ Don't check this attribut (only in attribute check |
|
| 63 |
+ mode) |
|
| 64 |
+ --touch=TOUCH Touch attribute giving in parameter to force resync a |
|
| 65 |
+ this LDAP object from provider. A value '%%TOUCH%%' |
|
| 66 |
+ will be add to this attribute and remove after. The |
|
| 67 |
+ user use to connect to the LDAP directory must have |
|
| 68 |
+ write permission on this attribute on each object. |
|
| 69 |
+ |
|
| 70 |
+ |
|
| 71 |
+Copyright |
|
| 72 |
+--------- |
|
| 73 |
+ |
|
| 74 |
+Copyright (c) 2013 Benjamin Renard |
|
| 75 |
+ |
|
| 76 |
+License |
|
| 77 |
+------- |
|
| 78 |
+ |
|
| 79 |
+This program is free software; you can redistribute it and/or |
|
| 80 |
+modify it under the terms of the GNU General Public License version 2 |
|
| 81 |
+as published by the Free Software Foundation. |
|
| 82 |
+ |
|
| 83 |
+This program is distributed in the hope that it will be useful, |
|
| 84 |
+but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 85 |
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 86 |
+GNU General Public License for more details. |
|
| 87 |
+ |
|
| 88 |
+You should have received a copy of the GNU General Public License |
|
| 89 |
+along with this program; if not, write to the Free Software |
|
| 90 |
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| ... | ... |
@@ -9,8 +9,16 @@ |
| 9 | 9 |
# compare between two servers |
| 10 | 10 |
# - by the second, all values of all atributes of all entries will |
| 11 | 11 |
# be compare between two servers. |
| 12 |
+# |
|
| 12 | 13 |
# In all case, contextCSN of servers will be compare and entries not |
| 13 |
-# present in consumer or in provider will be notice. |
|
| 14 |
+# present in consumer or in provider will be notice. You can decide to |
|
| 15 |
+# disable contextCSN verification by using argument --no-check-contextCSN. |
|
| 16 |
+# |
|
| 17 |
+# This script is also able to "touch" LDAP object on provider to force |
|
| 18 |
+# synchronisation of this object. This mechanism consist to add '%%TOUCH%%' |
|
| 19 |
+# value to an attribute of this object and remove it just after. The |
|
| 20 |
+# touched attribute is specify by parameter --touch. Of course, couple of |
|
| 21 |
+# DN and password provided, must have write right on this attribute. |
|
| 14 | 22 |
# |
| 15 | 23 |
# This script could be use as Nagios plugin (-n argument) |
| 16 | 24 |
# |
| 17 | 25 |