check_clock_offset - NRPE clock ntp offset check
From TykWiki
Revision as of 01:14, 1 March 2010 by Tykling (talk | contribs) (Created page with '{{DISPLAYTITLE:check_clock_offset - NRPE clock ntp offset check}} category:nagios The <code>net-mgmt/nagios-plugins</code> port contains the plugin <code>check_ntp_time</code…')
The net-mgmt/nagios-plugins
port contains the plugin check_ntp_time
which can be used to see how far off the servers clock is, when compared to an NTP server somewhere.
Configuring Nagios
Define a new service on the Nagios server, in /usr/local/etc/nagios/objects/services.cfg
:
define service{ use generic-service hostgroup_name freebsd-servers,freebsd-jails service_description nrpe_check_clock_offset check_command check_nrpe2!check_clock_offset }
All the FreeBSD servers I monitor gets their clocks checked, hosts as well as jails.
Configuring NRPE
Add the following line to /usr/local/etc/nrpe.cfg
:
command[check_clock_offset]=/usr/local/libexec/nagios/check_ntp_time -H dk.pool.ntp.org -w 0.5 -c 1
Replacing dk.pool.ntp.org
with a local NTP server (pool).
Remember to restart NRPE after changing the config:
sudo /usr/local/etc/rc.d/nrpe2 restart