Nagios plugin to check active directory, checkdc.vbs is a script that performs the checks done by dcdiag.exe and parse its output to a nagios format. Right now its a limited script, no arguments and wont allow to select what to check. It basicly runs this command:
dcdiag /test:services /test:replications /test:advertising /test:fsmocheck /test:ridmanager /test:machineaccount
So to have it installed, it does require the Windows Resource Kit tool command dcdiag.exe
witch you can download from here or from microsoft.com. Be sure to copy it to c:windowssystem32
It also requires Nagios nad NRPE_NT agent, define the command/service in nagios server and deifne the nrpe.cfg.
For helping doing all these check this post
The script version 3.0 is available to download here.
NOTE: By default in Windows 2003 the TrkSvr which is the Distributed Link Tracking Server, is set to disabled in also the TrkWrks Distributed Link Tracking Server, causing the script to go to Critical .
Set those and RPCLocator services to automatic and started them the issue will be resolved.
‘Script to check the status of a DOMAIN controller and report to Nagios
‘Author: Felipe Ferreira
‘For now just check all tests and report critical if one fails.
‘If need to check just specific tests edit cmd variable and remove all checks vars.
‘Get from args what to check, update status to 2 and also build the cmd line
‘loop thru args and with a select update tests status to 2
Fixed and Working.