Table of Contents

Name

check_remote_by_udp_time - nagios plugin for getting remote clock diff by udp

Synopsis

check_remote_by_udp_time -w warnlevel -c critlevel -H ip-address -p port [ -u unit ]

Description

check_remote_by_udp_time is a nagios plugin for remote checking hosts by udp. It was written as a (fast) alternative to net-snmp and it is designed to work with knoerred, a small udp-server.
check_remote_by_udp_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 response. The value will be interpreted as a positive integer with up to 64 bits.
If the value is greater than the specified warning or critical level then check_remote_by_udp_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. See examples.

Options

-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 udp server on the remote host.

-u unit
Specify an optional unit string which is placed after the remote value and which is visible in nagios.

Files

check_remote_by_udp_time does not use any files, but a sample nagios config is shown here:

# cat /etc/nagios/oth.cfg
define command{
command_name check_remote_time

command_line $USER1$/check_remote_by_udp_time -w $ARG1$ -c $ARG2$ -H $HOSTADDRESS$ -p 8888 -u " sec(s) difference"

}
# cat /etc/nagios/msc.cfg
define service{
use service-1h

name time

check_command check_remote_time!30!1800

register 0

}

See Also

check_remote_by_udp(1) , knoerred(1) , knoerre(1)

http://downloads.tuxad.de/ngtx

Examples

Two examples of check_remote_by_udp_time with knoerred as remote udp server:

$ check_remote_by_udp_time -H 172.16.1.1 -w 30 -c 300 -p 8888
REMOTE OK - 0 | timediff=0

Author

Frank Bergmann, http://www.tuxad.com


Table of Contents