AW: Monitor Active Directory Replication

Sand Philipp Philipp.Sand at sycor.de
Tue May 17 10:30:02 CEST 2005


Hi,

seems to be a really useful script!
Has anyone integrated this script to be "Nagios like"?

I've just searched the ads cookbook for it, but there are no explanations to the output there, so I don't know which output is "good" and which is "bad"...could you maybe give some examples for it?

_____________________________

Philipp Sand
OC-CC-TEC-SYS

SYCOR GmbH
Heinrich-von-Stephan-Straße 1-5
D - 37073 Göttingen

Telefon	+49 (0) 551 - 490 - 0
Telefax	+49 (0) 551 - 490 - 232468

philipp.sand at sycor.de
www.sycor.de
------------------------------------------------
 
________________________________________
Von: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-admin at lists.sourceforge.net] Im Auftrag von Collier, Tirus
Gesendet: Dienstag, 10. Mai 2005 16:55
An: Don Alfredo; nagios-users at lists.sourceforge.net
Betreff: RE: [Nagios-users] Monitor Active Directory Replication

Here's a script to check synchronization between DCs, more perl scripts are available at
http:/rallenhome.com
 
# This Perl code prints the up-to-dateness vector for the DCs defined in
# the  arrDCList for the naming context defined by $strNCDN

# ---------------------------------------------------------------
# Adapted from VBScript code contained in the book:
#      "Active Directory Cookbook" by Robbie Allen
# Publisher: O'Reilly and Associates
# ISBN: 0-596-00466-4
# Book web site: http://rallenhome.com/books/adcookbook/code.html
# ---------------------------------------------------------------

# ------ SCRIPT CONFIGURATION ------
# Set to the DN of the naming context you want to check the DCs against
my $strNCDN = "<NamingContextDN>";
# Enter 2 or more DCs to compare
my @arrDCList = ("<DC1Name>","<DC2Name>");
# ------ END CONFIGURATION ---------
use Win32::OLE 'in';
$Win32::OLE::Warn = 3;
my $objIadsTools = Win32::OLE->CreateObject("IADsTools.DCFunctions");

foreach my $strDC (@arrDCList) {
   print "Replication partner USNs for $strDC:\n";
   $intUSN = $objIadsTools->GetHighestCommittedUSN( $strDC,0);
   if ($intUSN == -1) {
      print "Error retrieving USN: ", $objIadsTools->LastErrorText,"\n";
      exit;
   }
   print "\t$strDC = $intUSN\n";

   my $intRes = $objIadsTools->GetReplicationUSNState( $strDC, $strNCDN,0,0);
   if ($intRes == -1) {
      print "Error retrieving USNs: ", $objIadsTools->LastErrorText,"\n";
      exit;
   }
   foreach my $count (1 .. $intRes) {
      print "\t", $objIadsTools->ReplPartnerName($count),
                " = ", $objIadsTools->ReplPartnerUSN($count),"\n";
   }
   print "\n";
}

________________________________________
From: nagios-users-admin at lists.sourceforge.net on behalf of Don Alfredo
Sent: Mon 5/9/2005 5:24 PM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Monitor Active Directory Replication
On Friday 06 May 2005 15:06, David Jacobson wrote:
> Hi Nagios Users,
>
> Does anyone have a script to monitor if Active Directory Replication was
> successful?  Our goal for 2005 is not to reinvent the wheel, if someone
> has a script like this it would be great.  Sorry I cannot provide more
> info as I do not like and/or use Microsoft products.
>
> Thanks a mil.

get nagios eventlog agent here :
http://www.steveshipway.org/software/f_nagios.html

figure out the event source and eventID for the directory replication
success / failure , create a filter for nagios eventlog, create a new nagios
check-command and you're done.
Do read the manuals, though... (specially the nsca stuff)



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_idt12&alloc_id344&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list