Nagios XI Integration Guide

Nagios XI expands upon the capabilities of the Nagios Core software to provide you with detailed host and service monitoring for your critical IT systems. In this guide we will walk you through the process of configuring Nagios XI to work with PagerDuty.

Setting up the PagerDuty / Nagios XI integration

Tested with Nagios XI 2012R1.4 on CentOS 6×64

In PagerDuty:

If you don’t already have a PagerDuty “Nagios” service, you should create one:

  1. In your account, under the Configuration tab, select Services from the dropdownpdrela menu.


  2. Click “Add New Service”. 


  3. Enter a name for the service and select an escalation policy.
  4. Start typing “Nagios XI” under “Integration Type” to filter your choices. Then, click the “Add Service” button.


  5. Once the service is created, you’ll be taken to the service page. On this page, you’ll see the “Service API key”, which will be needed when you configure your Nagios XI to send events to PagerDuty.

From your Nagios XI Server Shell

  1. Install the PagerDuty agent as described here:

In Nagios XI:

Create the New Commands

  1. Login to the Core Configuration Manager by going to Configure and clicking on Core Config Manager. Note: This login is separate from your nagiosadmin account.

  2. Click on Commands > Commands.

  3. Click on the Add New button.
  4. Enter the information as follows:Command Name:

    Command Line:


    Command Type:

    misc command

    Active: Checked

  5. Click on Save.

  6. Repeat the steps to add a second command.Command Name:

    Command Line:

    /usr/share/pdagent-integrations/bin/pd-nagios -n host -k $CONTACTPAGER$ -t "$NOTIFICATIONTYPE$" -f HOSTNAME="$HOSTNAME$" -f HOSTSTATE="$HOSTSTATE$"

    Command Type:

    misc command

    Active: Checked

  7. Click the Apply Configuration button.

Create the new Contacts

  1. You’ll need to create a PagerDuty contact. To do so, go to Alerting > Contacts.
  2. Click on Add New.
  3. Enter the following under Common Settings:Contact Name:

    (Note: If you are connecting with multiple PagerDuty services via Nagios, you will have to use different Contact names (e.g. pagerduty_service1, pagerduty_service2, etc…))Description:


    Active: Checked

  4. Enter the following under Alert Settings:Host Notifications Enabled: onHost Notification Timeperiod: 24×7Host Notification options: d, r
  5. Click on Manage Host Notification Commands

  6. Select notify-host-by-pagerduty 
from the Hostcommands list.
  7. Click Add Selected.
  8. Click Close.

    Service Notifications Enabled: on Service Notification Time period: 24×7Service Notification options: w,u,c,r

  9. Click on Manage Service Notification Commands
  10. Select notify-service-by-pagerduty 
from the Hostcommands list.
  11. Click Add Selected.
  12. Click Close.

  13. Under Misc Settings, click on Manage Variable Definitions

  14. Enter the following information:Variable name:

    Variable value:Enter your service API key

  15. Click Insert.
  16. Click Close.

  17. Click Save.

  18. Click Apply Configuration.

  19. Under Templates > Host Templates:
  20. You’re going to want to select a host template that will apply to the servers that you want to manage.  For this basic installation, we’re going to select linux-server as we’re just monitoring this local server.

  21. Enter a Description.

  22. Click on Alert Settings and enter the following settings:Notification period: 24×7Notification options: d,u,rNotification interval: 1 minNotification enabled: on

  23. Click on Manage Contactgroups

  24. Click on admins.
  25. Click Add Selected.
  26. Click Close.

  27. Click Save.
  28. Click on Apply Configuration.

You’ve now added PagerDuty notification to Nagios XI!


Since Nagios XI needs my external Internet connection to send failure reports to PagerDuty, how will I receive notification if our site loses external connectivity?

You should configure an external ping check service such as StatusCake or NodePing to monitor your site’s external connectivity. Of course, you can use PagerDuty to forward alerts from these services.