Hello Diego, thanks for answering!
Well, I researched a little more and discover that I can manage this using a
contextCSN, like this script:
$ cat check_ldap_replication.sh
test1=`ldapsearch -LLL -x -h $master -b $dn -s base contextCSN`
test2=`ldapsearch -LLL -x -h $slave -b $dn -s base contextCSN`
if [ "$test1" == "$test2" ]
echo -en "Ldap Servers ARE in sync\n"
echo $master: $test1
echo $slave: $test2
echo -en "Ldap Servers are _NOT_ in sync\n"
echo server1: $test1
echo server2: $test2
./check_ldap_replication.sh 172.18.40.15 172.18.40.16
Ldap Servers ARE in sync
172.18.40.15: dn: dc=ir7,dc=com,dc=br contextCSN:
172.18.40.16: dn: dc=ir7,dc=com,dc=br contextCSN:
Anyway, here are recorded for future reference :)
And, at last, the LDAP Tool Box project has a perl script that does this and
also have thresholds about delay on replication, if you need.
Thanks a lot!
On Mon, Oct 4, 2010 at 3:18 PM, Diego Lima <lists(a)diegolima.org> wrote:
Mirror Mode is a lot like syncrepl, except that both servers act like
Master and Slave simultaneously (you'll probably notice that you have
set up both the syncprov overlay and syncrepl directives). So, AFAIK
scripts that you'd use for syncrepl should work for monitoring a
multi-master setup using mirror mode.
2010/9/29 Tiago Cruz <tiago.tuxkiller(a)gmail.com>:
> Hello folks,
> I have 2 OpenLDAP 2.4.11 running as Mirror Mode very well.
> But I would like to make sure that everything was replicated how should
> forever :) so I would like to write some script to monitor it.
> I've searched around web, but I only found some about LDAP 2.2 and 2.3
> Can you give me some tip about how I can do this?
>It also does performance monitoring (e.g. graphs of searches, binds,
> Many thanks!
> -- Tiago Cruz
-- Tiago Cruz