We're using active service checks to monitor the NTP time difference on remote Windows hosts, which are running NSClient++.
It appears that check_nrpe loses the minus sign in the performance data when the NTP offset value is negative.
Here is an example.
On the Windows remote host:
1) NSClient++ config entry for the "check_time" command:
Code: Select all
[/settings/external scripts/scripts]
check_time=cscript.exe //NoLogo "D:/Progra~1/NSClient++/scripts/check_time.vbs" time.windows.com 20.0 30.0
Code: Select all
D:\Program Files (x86)\NSClient++>cscript.exe //NoLogo "D:/Progra~1/NSClient++/scripts/check_time.vbs" time.windows.com 20.0 30.0
NTP OK: Offset -0.4702899 secs|'offset'=-0.4702899s;20.0;30.0;0
1) Service command definition is:
Code: Select all
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
Where $ARG1$ is check_time and no other arguments are specified.
Code: Select all
# /usr/local/nagios/libexec/check_nrpe -H 192.168.30.40 -t 30 -c check_time
NTP OK: Offset -0.5256143 secs|'offset'=0.52561s;20;30
Code: Select all
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required