Monitor Nagios Itself

Nagios is a popular tool for monitoring servers and network infrastructure. By monitoring Nagios itself, you will gain the peace of mind that you'll be notified instantly if your monitoring system goes down or a network partition prevents it from dispatching alerts.

Monitoring Nagios with Cronitor is easy: By creating and invoking a Nagios check_http_url command, Cronitor will listen for pings from your Nagios service. If your service does not ping when expected, Cronitor will send you an alert.

Creating a Nagios monitor

Monitoring nagios can be completed in just a few minutes.

  1. From your dashboard, click the button to create a new monitor and select Heartbeat
  2. Add a "Run endpoint not pinged in 2 minutes" rule.
  3. Add at least one notification method across Email, SMS, Slack, Hipchat, PagerDuty, etc
  4. Give the monitor a descriptive name like Nagios Monitor and add optional tags or notes
  5. Save the monitor and you will be given a unique ping URL.

Your new monitor is created in a paused state; monitoring will not begin until the first ping is received.

Integrating your Nagios monitor

You will need to configure a new Nagios command using the built-in check_http command:

  1. Create a command definition:
    define command{
        command_name    check_http_url
        command_line    $USER1$/check_http -I $HOSTADDRESS$ -u $ARG1$
  2. Adapt the service definition below, using the unique ping URL provided in the previous step. If you have changed the interval duration from the default of 1 minute, adjust the check_interval appropriately.
    define service{
        host_name                       cronitor
        service_description             External Nagios Monitoring
        check_command                   check_http_url!
        max_check_attempts              3
        check_interval                  1
        retry_interval                  1
        check_period                    24x7
        notification_interval           300
        notification_period             workhours