Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_localtime - can do hearbeat alert
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!
This is a simple nagios plugin to report localtime of the nagios system itself (or remote system when this is used with NRPE).
It has interesting feature in that it accepts (one or more) parameters for certain timerange and report CRITICAL value if local time is within that range. This can be used to setup daily 'heartbeat' alerts for example as follows:
define command { command_name daily_alert command_line $USER1$/check_localtime.pl $ARG1$ $ARG2$ }
define service{ use generic-service host_name nagios service_description Heartbeat Alert check_command daily_alert!9:00-9:10!21:00-21:10 is_volatile 0 check_period 24x7 max_check_attempts 1 normal_check_interval 1 retry_check_interval 1 notification_interval 0 }
Above will cause two nagios alerts - one between 9-9:10am and second at 9-9:10pm (for plugin time is specified in 24-hour format). This is so your NOC personnel know that nagios is running fine if you don't have other alerts during the day.