Hello,
We have a decent sized env. (1 master, 16 slaves in different datacenters across the world) and we're trying to find a way to effectively monitor the status of replication. When was the last update? How many changes were made? How long did it take from start to finish? I know you can get most of this information from the gui, but we need to tie it in to our monitoring application. Is this information stored in a db anywhere? In ldap itself? Any insight would be appreciated.
Thanks in advance! - Ian
I use a script like this:
#! /bin/bash # Script para verificar el estado de la replicacion del directorio # Ivan Ferreira - Enero 2007
MAILTO=iferreir@domain.com.py STATUSFILE=/var/log/DSLastUpdateStatus.log
ldapsearch -x -D "uid=replmon,ou=Special Users,dc=sis,dc=personal,dc=net,dc=py" \ -b 'cn=replica,cn="dc=sis,dc=personal,dc=net,dc=py",cn=mapping tree,cn=config' \ -w <password> objectClass=nsDS5ReplicationAgreement \ nsds5replicaLastUpdateStatus nsds5replicaLastUpdateStart | grep -E \ "^nsds5replicaLastUpdateStatus|^nsds5replicaLastUpdateStart" > $STATUSFILE 2>&1
STATUS=`grep "^nsds5replicaLastUpdateStatus" $STATUSFILE |awk '{ print $2 }'` DETAIL=`grep "^nsds5replicaLastUpdateStatus" $STATUSFILE | awk '{ for (i=3; i<=NF; i++) printf "%s ", $i }'` if [ $STATUS -ne 0 ] then echo "ALERT!! Directory replication failed with status: $DETAIL" | mail \ -s "Directory replication failed" $MAILTO fi # echo $STATUS $DETAIL
Para "General discussion list for the Fedora Directory server "Ian Meyer" project." ianmmeyer@gmail.com <fedora-directory-users@redhat.c Enviado por: om> fedora-directory-users-b cc ounces@redhat.com Asunto 27/09/2007 11:28 a.m. [Fedora-directory-users] How can you monitor replication? Clasificación Uso Interno Por favor, responda a "General discussion list for the Fedora Directory server project." <fedora-directory-users@ redhat.com>
Hello,
We have a decent sized env. (1 master, 16 slaves in different datacenters across the world) and we're trying to find a way to effectively monitor the status of replication. When was the last update? How many changes were made? How long did it take from start to finish? I know you can get most of this information from the gui, but we need to tie it in to our monitoring application. Is this information stored in a db anywhere? In ldap itself? Any insight would be appreciated.
Thanks in advance! - Ian
-- Fedora-directory-users mailing list Fedora-directory-users@redhat.com https://www.redhat.com/mailman/listinfo/fedora-directory-users
======================================================================================== AVISO LEGAL: Esta información es privada y confidencial y está dirigida únicamente a su destinatario. Si usted no es el destinatario original de este mensaje y por este medio pudo acceder a dicha información por favor elimine el mensaje. La distribución o copia de este mensaje está estrictamente prohibida. Esta comunicación es sólo para propósitos de información y no debe ser considerada como propuesta, aceptación ni como una declaración de voluntad oficial de NUCLEO S.A. La transmisión de e-mails no garantiza que el correo electrónico sea seguro o libre de error. Por consiguiente, no manifestamos que esta información sea completa o precisa. Toda información está sujeta a alterarse sin previo aviso.
This information is private and confidential and intended for the recipient only. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and shall not be regarded neither as a proposal, acceptance nor as a statement of will or official statement from NUCLEO S.A. . Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
Ian Meyer wrote:
Hello,
We have a decent sized env. (1 master, 16 slaves in different datacenters across the world) and we're trying to find a way to effectively monitor the status of replication. When was the last update? How many changes were made? How long did it take from start to finish? I know you can get most of this information from the gui, but we need to tie it in to our monitoring application. Is this information stored in a db anywhere? In ldap itself? Any insight would be appreciated.
http://www.redhat.com/docs/manuals/dir-server/ag/7.1/replicat.html#1106144
Thanks in advance!
- Ian
-- Fedora-directory-users mailing list Fedora-directory-users@redhat.com https://www.redhat.com/mailman/listinfo/fedora-directory-users
Thank you Richard and Ivan.. your replies are very helpful. :)
- Ian
On 9/27/07, Richard Megginson rmeggins@redhat.com wrote:
Ian Meyer wrote:
Hello,
We have a decent sized env. (1 master, 16 slaves in different datacenters across the world) and we're trying to find a way to effectively monitor the status of replication. When was the last update? How many changes were made? How long did it take from start to finish? I know you can get most of this information from the gui, but we need to tie it in to our monitoring application. Is this information stored in a db anywhere? In ldap itself? Any insight would be appreciated.
http://www.redhat.com/docs/manuals/dir-server/ag/7.1/replicat.html#1106144
Thanks in advance!
- Ian
-- Fedora-directory-users mailing list Fedora-directory-users@redhat.com https://www.redhat.com/mailman/listinfo/fedora-directory-users
-- Fedora-directory-users mailing list Fedora-directory-users@redhat.com https://www.redhat.com/mailman/listinfo/fedora-directory-users
All this code is EXACTLY what I was looking for. I took this code and built it to work with nagios. It works great.
#!/usr/bin/perl use strict; # Edward Capriolo 2007 # Based on code by # Ivan Ferreira - Enero 2007 #usage perl check_ldap_replication ldapsomething.something.com "cn=Directory Manager" "mypassword" "cn=replica,cn=o=something.com,cn=mapping tree,cn=config"
#define command { # command_name check_ldap_replication # command_line $USER1$/check_ldap_replication $HOSTADDRESS$ "$ARG1$" "$ARG2$" "$ARG3$" #}
my $host=$ARGV[0]; #ldapsomething.something.com my $cn=$ARGV[1]; #cn=Directory Manager my $pass=$ARGV[2]; #mypassword my $base=$ARGV[3]; "cn=replica,cn=o=something.com,cn=mapping tree,cn=config"
my $r_cmd="/usr/bin/ldapsearch -h $host -x -D "$cn" -b "$base" -w $pass objectClass=nsDS5ReplicationAgreement nsds5replicaLastUpdateStatus nsds5replicaLastUpdateStart"; #print "$r_cmd\n"; my @list = split ( /\n/, `$r_cmd` );
my $res=-1; my $line="";
for (my $j=0;$j<@list;$j++){ # print "$list[$j]\n"; if ($list[$j] =~ /^nsds5replicaLastUpdateStatus/){ # print $list[$j]; $line=$list[$j]; my @tok = split ( /\s/, $list[$j] ); $res=$tok[1]; } }
if ($res == 0 ){ print ("Replication OK: $line\n"); exit 0; }
if ($res != 0 ) { print ("Replication FAILED: $line\n"); exit 2; }
On 9/27/07, Ian Meyer ianmmeyer@gmail.com wrote:
Thank you Richard and Ivan.. your replies are very helpful. :)
- Ian
On 9/27/07, Richard Megginson rmeggins@redhat.com wrote:
Ian Meyer wrote:
Hello,
We have a decent sized env. (1 master, 16 slaves in different datacenters across the world) and we're trying to find a way to effectively monitor the status of replication. When was the last update? How many changes were made? How long did it take from start to finish? I know you can get most of this information from the gui, but we need to tie it in to our monitoring application. Is this information stored in a db anywhere? In ldap itself? Any insight would be appreciated.
http://www.redhat.com/docs/manuals/dir-server/ag/7.1/replicat.html#1106144
Thanks in advance!
- Ian
-- Fedora-directory-users mailing list Fedora-directory-users@redhat.com https://www.redhat.com/mailman/listinfo/fedora-directory-users
-- Fedora-directory-users mailing list Fedora-directory-users@redhat.com https://www.redhat.com/mailman/listinfo/fedora-directory-users
-- Fedora-directory-users mailing list Fedora-directory-users@redhat.com https://www.redhat.com/mailman/listinfo/fedora-directory-users
389-users@lists.fedoraproject.org