Home Directory Plugins System Metrics Time check_localtime - can do hearbeat alert

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

check_localtime - can do hearbeat alert

Rating
0 votes
Favoured:
0
Owner
Hits
89734
Files:
FileDescription
check_localtime.plcheck_localtime.pl
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
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.

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.