Search Exchange
Search All Sites
Login
Check Windows Time Offset (check_windows_time.bat)
This plugin will check a windows system against a specified time source. Meant to be used via check_nrpe.
To make installation simple it is just a .bat file that is basically a glorified nagios wrapper for w32tm. Tested on Windows 2k3/2k8/2k8r2. While a bit raw, it does return some common errors (i.e. - server not found)
A windows domain controller can used as a time source as well as a other NTP servers.
To get the plugin going, copy the check_windows_time.bat file to your nagios client /scripts folder on the Windows machine and define the script in your nsc.ini. Don't forget to enable command arguments if you wish to pass the ntp source and other arguments from check_nrpe.
check_windows_time.bat - Nagios plugin that checks time offset against a specified ntp server.
Usage: check_windows_time.bat timeserver warning critical
* warning and critical in seconds
C:>check_windows_time.bat pool.ntp.org 180 300
OK: Time is -01.0821202s from pool.ntp.org|'Offset'=01s;180;300;0
$ /usr/local/nagios/libexec/check_nrpe -H my-server.domain.local -c check_windows_time -a pool.ntp.org 180 300
OK: Time is +00.0120138s from pool.ntp.org|'Offset'=00s;180;300;0
check_windows_time.bat - Nagios plugin that checks time offset against a specified ntp server.
Usage: check_windows_time.bat timeserver warning critical
* warning and critical in seconds
C:>check_windows_time.bat pool.ntp.org 180 300
OK: Time is -01.0821202s from pool.ntp.org|'Offset'=01s;180;300;0
$ /usr/local/nagios/libexec/check_nrpe -H my-server.domain.local -c check_windows_time -a pool.ntp.org 180 300
OK: Time is +00.0120138s from pool.ntp.org|'Offset'=00s;180;300;0
Reviews (2)
bypestigarribia, November 7, 2012
This was very useful, only one note that I have to do:
NSC.INI
I have to enable:
; Script to check external scripts and/or internal aliases.
CheckExternalScripts.dll
NSC.INI
I have to enable:
; Script to check external scripts and/or internal aliases.
CheckExternalScripts.dll
bystaso, September 27, 2012
Works for me ! Thanks !


New Listings


