Set Up Urgency-Based Notifications with Nagios

Plan Requirements

The Urgencies feature is available only with Basic or higher plans. If you would like to upgrade to a plan that includes urgencies, please contact our sales team.

Getting Started

You will be segmenting your Nagios and PagerDuty notifications based on whether the Nagios incident is high or low urgency.

You will need to configure two Nagios services within your PagerDuty account, one for high urgency incidents and one for low urgency incidents. Although you can add multiple integrations to a single service, two separate services are required for this method since urgencies are defined at the service level, rather than at the integration level.

First, navigate to the Configuration menu and select Services. Then click the Add New Service button.
Next, to create your Nagios service, do the following:

  1. Give the service a Name (i.e. Nagios Critical, Nagios Non-Critical).
  2. Select Nagios from the Integration Type list.
  3. Enter an Integration Name (i.e. Nagios Server)
  4. Select an Escalation Policy to use when an incident is triggered.
  5. Choose your desired Notification Urgency for incidents triggered on this service.
  6. Click Add Service.
  7. Repeat these steps for your second service, with a different name for the second service.

Configuring Your Server

Follow the setup steps based on your operating system as found in the Nagios Integration Guide with the following variations:

Use this alternative pagerduty_nagios.cfg example file as a replacement for the one shown in step 2 of the On Your Nagios Server section:

wget https://raw.github.com/ryanhoskin/pagerduty-nagios-severity-based/master/pagerduty_nagios.cfg

Make sure that you modify pagerduty_nagios.cfg to contain your two integration keys on the pager line as shown in the example file.

Now modify your contact groups by replacing step 7 with the following:

Add pagerduty-critical and pagerduty-noncritical contacts to your Nagios configuration's main contact group. If you're using the default configuration, open /etc/nagios3/conf.d/contacts_nagios2.cfg (on Debian-based systems) or /etc/nagios/localhost.cfg (on RHEL-based systems) and look for the admins contact group. Then, simply add the pagerduty-critical and pagerduty-noncritical contacts.

define contactgroup {
  contactgroup_name admins
  alias Nagios Administrators
  members root, pagerduty-critical, pagerduty-noncritical ; <--** Add contacts here.**
}

If you're using the default Nagios configuration, you can replace /etc/nagios3/conf.d/contacts_nagios2.cfg or /etc/nagios/localhost.cfg with this file.

Set Up Urgency-Based Notifications with Nagios