[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Monitoring 2.3.43?

2012/5/25 Andrew Findlay <andrew.findlay@skills-1st.co.uk>:
> On Thu, May 24, 2012 at 12:44:04PM +0300, Nick Milas wrote:
>> >But in the meantime, is there any way to know/figure out if the
>> >master and it's slave(s) are in
>> >sync?
>> This was discussed only yesterday!
>> Supposing you are replicating the full DIT: slapcat both ends, use
>> the ldifsort utility to sort the outputs, then use diff to check for
>> any differences.
> You only ned to do that if you are worried about a replication
> protocol failure or a database failure. In normal operation it should
> be enough to read the contextCSN attribute from the root of the
> replicated subtree on each server:
> #!/bin/sh
> #
> # check-replication
> PATH=/usr/local/bin:/usr/bin:/bin
> export PATH
> for host in ermine.example.org trude.example.org
> do
>        echo $host
>        ldapsearch -LLL -x -H ldap://$host/ -b 'dc=example,dc=org' -s base contextCSN
> done
> If the servers are in sync then the values you see will be identical
> on all servers. If any of the values differ you can parse them to work
> out how far out-of-date each server is.

If you are looking for a Nagios script, you can find one here: