Table of Contents
- nagios plugin for getting remote clock
diff by http
[ -D ] -w warnlevel -c critlevel
-H ip-address -p port [ -u unit ]
a nagios plugin for remote checking hosts by (simplified) http.
It was written
as a (fast) alternative to net-snmp and it is designed to work with knoerre,
a small http-server.
sends a "timediff" request with the current unix
timestamp to the remote server. Then it expects the difference in seconds
between local and remote system clock. It takes the value from the last
line of the remote HTTP response. The value will be interpreted as a positive
integer with up to 63 bits.
If the value is greater than the specified warning or critical level then
check_remote_by_http_time will also recognize the line before and print
it contents as additional information (if knoerre runs on the remote host
it will send its own timestamp in the line before last). This additional
or debug information is printed between the remote value and the performance
data. Its output is formatted as HTML-data with the original URL sent to
the remote host as link. See examples.
not use any files, but a sample nagios config is shown here:
- -w warnlevel
- Specify the
warning level. The remote value must be greater than the warnlevel to trigger.
- -c critlevel
- Specify the critical level. The remote value must be greater
than the critlevel to trigger.
- -H ip-address
- Specify the IP address of the
remote server to check.
- -p port
- Specify the port of the http
server on the
- -u unit
- Specify an optional unit string which is placed after
the remote value and which is visible in nagios.
- Use TCP_DEFER_ACCEPT
). This can speed up our http-communication
by approx. 10 percent,
but it breaks tcp-communication by RFC - like many others too. It can also
cause trouble with loadbalancers like F5 which send "early" ACK packets
to the server before ACK from client.
# cat /etc/nagios/oth.cfg
-w $ARG1$ -c $ARG2$ -H
$HOSTADDRESS$ -p 8888 -u " sec(s) difference"
# cat /etc/nagios/msc.cfg
Two examples of check_remote_by_http_time
with knoerre as remote http server:
-w 30 -c 300 -p 8888
REMOTE OK - 0 | timediff=0
-H 172.16.1.5 -w 30 -c 300 -p 8888
REMOTE WARNING - 44 (<a href="http://172.16.1.5:8888/timediff/1222339166">1222339210</a>)
Frank Bergmann, http://www.tuxad.com
Table of Contents