Install the dcdiag.exe program from the Windows Server 2003 Support Tools.
Links:
See Monitoring windows with NSClient++.
Make sure the module CheckExternalScripts.dll is enabled in NSC.ini
check_ad home page: http://www.itefix.no/i2/check_ad
The wrapper call dcdiag.exe and return the result.
Copy the check_ad.exe program into c:\Program Files\NSClient++\scripts\.
The program is in the check_ad-1.4.zip package.
Add check definition to the [External Scripts] section in NSC.ini, like:
[External Scripts] ... check_ad=scripts\check_ad.exe --dc --noeventlog
Nagios command defintion:
$USER1$/check_nrpe -u -H $HOSTADDRESS$ -p $ARG1$ -c check_ad
Sample output:
AD OK - Connectivity OK, Services OK, Replications OK, Advertising OK, Fsmo OK, Rid Manager OK, Machine account OK, FRS Sysvol OK