
check_localtime – can do hearbeat alert
Description:
This is a special plugin that will check localtime on the system its running on and for specified time will generate an alert. This is useful for setting up regular hearbeat alerts.
Current Version
Last Release Date
May 28, 2009
Compatible With
Owner
Project Files
File | Description |
---|---|
check_localtime.pl |
Project Notes
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.