AD replication errors

Enyone got to share how to monitor AD replication errors. Maybe checkeventlog with nrpe? anything else?

you could maybe use itefix.no/download/check_ad-1.3.zip

can you point me how to configure this ? in nagios server and in AD ?

Put exe in AD server. Configure NRPE handler, in nagios server use check_nrpe to call NRPE handler in server. Have dcdiag and netdiag fron windows support tools in AD. I havent tested it yet so I cannot provide detailed example of using it.

Example

  1. Download support tool for windows server so dcdiag and netdiag can be run from command line.
  2. in NSC.ini put these in NRP handlers section
 #AD
command[check_ad_dc]=C:\Program Files\NSClient++\modules\check_ad.exe --dc
command[check_ad_member]=C:\Program Files\NSClient++\modules\check_ad.exe --member
  1. restart nsclient++.I assume you have NRPE configured already.
  2. put check_ad exe to C:\Program Files\NSClient++\modules\check_ad.exe, or what ever you like
  3. command.cfg in nagios add
define command{
        command_name    check_nrpe
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
  1. in servers.cfg you can user

check_command check_nrpe!check_ad_dc and check_command check_nrpe!check_ad_member

better would be to use check_reps.pl from hannes-schulz.de/Projects/nagios/check_reps.pl. But how, I havent figured out that yet. Needs active perl on windows, and this simply does repadmin /showreps and outputs failed values.

as this script is really simple, I’d advise to redo it but in VBscript :slight_smile:

hello sassuli,

I did as per your suggestion like in NSC.ini file I added lines like this
[NRPE Handlers]
;# COMMAND DEFINITIONS
;# Command definitions that this daemon will run.
;# Can be either NRPE syntax:
command[check_ad_dc]=C:\NSClient++\modules\check_ad.exe --dc
command[check_ad_dc]=C:\NSClient++\modules\check_ad.exe --member
;command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10

and put check_ad.exe in c:\NSclient\modules then added lines in nagios server command.cfg like
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}

And in server added line like below :
check_command check_nrpe!check_ad_dc
and check_command check_nrpe!check_ad_member

I get error message on nagios server as Check_Nrpe socket timeout after 10 seconds

What else i am missing ?

Madal

“command[check_ad_dc]=C:\NSClient++\modules\check_ad.exe --member"
should be
"commandcheck_ad_member]=C:\NSClient++\modules\check_ad.exe --member”

…but that won’t solve your current problem :slight_smile:

=> Did you restart your NSClient after your modifications ?

Also remember that by default “port 5666” is commented and if you leave it like that, nrpe wont work.

hi again, Well, port 5666 is uncommented in NSC.ini file with loose recommendation for the command line. I also make sure 5666 port open in server and in client and installed support tools in client (server) I still get error Check_Nrpe: error receiving data from the daemon. dcdiag works in server however I also copied dcdiag.exe in c:\windows\System32 folder. What could be the issue here .

Madal

try “telnet yourserver 5666” from nagios machine to see if it get connected. If not, there is your issue. What version of nsclient++ you are using? what version of check_nrpe? you could compile check_nrpe and do further tests with it