Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_time_diff
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
Q. Why check_time_diff?
A. We wanted to check for both broken time synchronisation on both clients and servers in a way that was agnostic about whichever synchronisation mechanism was in use (ntpd, crony, systemd-timesyncd ...) on Linux systems. The plugins that did that were:
* check_daytime, rejected because we did not want to install something to listen on the daytime or time ports
* check_time, rejected because we did not want to set up ssh for it.
Q. Which OSes is check_time_diff known to work with?
A. Debian Jessie
Q. How to set up on the monitored host (NRPE server)?
1. Install check_time_diff.sh in /usr/lib/nagios/plugins root:root 755
2. Create /etc/nagios/nrpe.d/check_time_diff.cfg with this single line:
command[check_time_diff]=/usr/lib/nagios/plugins/check_time_diff.sh -c $ARG2$ -f $ARG3$ -t "$ARG4$" -w $ARG5$
3. Effect the new configuration by restarting service nagios-nrpe-server
Q. How to configure the Nagios server?
1. Create hostgroup no-time-diff by adding these lines to /etc/nagios3/conf.d/hostgroups_nagios2.cfg:
define hostgroup {
hostgroup_name no-time-diff
alias Hosts we do not check time on
}
2. Add these lines to /etc/nagios3/conf.d/services_nagios2.cfg, adding any other hostgroups which should not be checked:
define service {
check_command check_nrpe!check_time_diff!$HOSTALIAS$ 2 iso8601 "$SHORTDATETIME$" 1
service_description Time diff
hostgroup_name all, !no-time-diff
use generic-service
notification_interval 0
}
3. Validate the changed conf:
nagios3 -v /etc/nagios3/nagios.cfg
4. Effect the changed conf by restarting service nagios3
A. We wanted to check for both broken time synchronisation on both clients and servers in a way that was agnostic about whichever synchronisation mechanism was in use (ntpd, crony, systemd-timesyncd ...) on Linux systems. The plugins that did that were:
* check_daytime, rejected because we did not want to install something to listen on the daytime or time ports
* check_time, rejected because we did not want to set up ssh for it.
Q. Which OSes is check_time_diff known to work with?
A. Debian Jessie
Q. How to set up on the monitored host (NRPE server)?
1. Install check_time_diff.sh in /usr/lib/nagios/plugins root:root 755
2. Create /etc/nagios/nrpe.d/check_time_diff.cfg with this single line:
command[check_time_diff]=/usr/lib/nagios/plugins/check_time_diff.sh -c $ARG2$ -f $ARG3$ -t "$ARG4$" -w $ARG5$
3. Effect the new configuration by restarting service nagios-nrpe-server
Q. How to configure the Nagios server?
1. Create hostgroup no-time-diff by adding these lines to /etc/nagios3/conf.d/hostgroups_nagios2.cfg:
define hostgroup {
hostgroup_name no-time-diff
alias Hosts we do not check time on
}
2. Add these lines to /etc/nagios3/conf.d/services_nagios2.cfg, adding any other hostgroups which should not be checked:
define service {
check_command check_nrpe!check_time_diff!$HOSTALIAS$ 2 iso8601 "$SHORTDATETIME$" 1
service_description Time diff
hostgroup_name all, !no-time-diff
use generic-service
notification_interval 0
}
3. Validate the changed conf:
nagios3 -v /etc/nagios3/nagios.cfg
4. Effect the changed conf by restarting service nagios3
Reviews (0)
Be the first to review this listing!