.TH check_remote_by_http_time 1 "September 2008" "ngtx" .SH NAME check_remote_by_http_time \- nagios plugin for getting remote clock diff by http .SH SYNOPSIS .B check_remote_by_http_time [ .B \-D ] .B \-w .I warnlevel .B \-c .I critlevel .B \-H .I ip-address .B \-p .I port [ .B \-u .I unit ] .SH DESCRIPTION .B check_remote_by_http_time is 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 .B knoerre, a small http-server. .br .B check_remote_by_http_time 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. .br If the value is greater than the specified warning or critical level then .B check_remote_by_http_time will also recognize the line before and print it contents as additional information (if .B 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. .SH OPTIONS .TP .B \-w warnlevel Specify the warning level. The remote value must be greater than the warnlevel to trigger. .TP .B \-c critlevel Specify the critical level. The remote value must be greater than the critlevel to trigger. .TP .B \-H ip-address Specify the IP address of the remote server to check. .TP .B \-p port Specify the port of the http server on the remote host. .TP .B \-u unit Specify an optional unit string which is placed after the remote value and which is visible in nagios. .TP .B \-D Use TCP_DEFER_ACCEPT (see .B tcp(7) ). 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. .SH FILES .B check_remote_by_http_time does not use any files, but a sample nagios config is shown here: .RS # cat /etc/nagios/oth.cfg .br define command{ .br command_name check_remote_time .br command_line $USER1$/check_remote_by_http_time -w $ARG1$ -c $ARG2$ -H $HOSTADDRESS$ -p 8888 -u " sec(s) difference" .br } .br # cat /etc/nagios/msc.cfg .br define service{ .br use service-1h .br name time .br check_command check_remote_time!30!1800 .br register 0 .br } .RE .SH "SEE ALSO" .B check_remote_by_http(1), .B knoerre(1) .br http://downloads.tuxad.de/ngtx .SH EXAMPLES Two examples of .B check_remote_by_http_time with .B knoerre as remote http server: .RS $ check_remote_by_http_time -H 172.16.1.1 -w 30 -c 300 -p 8888 .br REMOTE OK - 0 | timediff=0 .br $ check_remote_by_http_time -H 172.16.1.5 -w 30 -c 300 -p 8888 .br REMOTE WARNING - 44 (1222339210) | timediff=44 .RE .SH AUTHOR Frank Bergmann, http://www.tuxad.com