Setting Up Urgency-Based Notifications with Nagios

Follow
Note: 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 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.

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.

Have more questions? Submit a request

Comments

  • Avatar
    Ashok Gupta

    This looks unnecessarily difficult to me. Creating two service, configuration is rather avoidable.

    What all the pagerduty needs to do is support severity as a first class attribute in their API parameters.

    Once that is done, all the behavior can be driven based on that. E.g. if it is critical send text as well as mail, if it is just a warning just send a mail.

    This doesn't have to be so difficult and convoluted.

  • Avatar
    Ryan Hoskin

    Hi Ashok,

    Thanks for the feedback. We definitely are in agreement. Treating severities as a first class attribute is on our radar/roadmap. I can't give any sort of e.t.a., but stay tuned! Feel free to reach out to us at support@pagerduty.com should you want to continue the discussion or if you have any additional thoughts/questions.

    Cheers,
    Ryan

  • Avatar
    Matt Smith

    It's been over a year since you said that this is on your roadmap. Are there any plans in the near future to make severity a first class citizen? This would SIGNIFICANTLY improve our alerting infrastructure. When you are managing dozens of services going to numerous teams this overhead is quite high.

  • Avatar
    Shaina Vu

    Hi Matt,

    Please accept our apologies for the delay surrounding this request. Urgency-based alerting with Nagios is still on our roadmap; we're working on some backend improvements now that should help to remove the bigger roadblocks. We can't provide any ETA on this at the moment, but please stay tuned and email us at support@pagerduty.com with additional questions or feedback!

  • Avatar
    Micah Berkley

    Do we have any update on this? We also are not interesting in modifying our production environment. Can we urge your development team to add some cycles to this. It would dramatically improve we utilize Pagerduty.

    We have actually been exploring other vendors to accomplish this task. As it is that important to us. Please keep us informed.

  • Avatar
    Ryan Hoskin

    Hi Micah and Matt,

    Our product manager in charge of this initiative just reached out to you via email to share what's happening here. I think it's good news!

  • Avatar
    Micah Berkley

    Ryan,

    Thank you for the update. Your product manager has reached out and we are having a great conversation. I look forward to the progress made on this feature, and the additional functionality you would provide to our Operations.