How to integrate Nagios with Pingdom

In this blog post we’ll show you how to get even more out of your monitoring by integrating Nagios with Pingdom.

Nagios is an open source computer system monitoring, network monitoring and infrastructure monitoring software application. Used by hundreds of thousands of users worldwide, Nagios monitors your entire IT infrastructure to ensure systems, applications, services, and business processes are functioning properly.

This tutorial can also be found on pingdom.com under our guides.

Getting started

We’re starting off in our control panel My Pingdom.

  1. Start by creating a new External Service ID. Under Monitoring > External Services click Add New.
    es_add
  2. Enter a Name and an Alert Policy.
    extraservice
  3. Click Save.
  4. Once the service is created it appears in the list of services on the page. In this list you’ll see the Service ID which you’ll need when you configure your Nagios server to send events to Pingdom. nagios

Setup

  1. Download nagios_config.cfg and pingdom_nagios.py:
  2. Place pingdom_nagios.py in a folder of your choice and make it executable i.e.
    sudo mkdir -p /opt/pingdom sudo mv pingdom_nagios.py /opt/pingdom/ sudo chmod +x /opt/pingdom/pingdom_nagios.py
  3. Place pingdom_nagios.conf in a suitable configuration directory (depends on your Nagios/Icinga setup), Debian for instance uses /etc/nagios3/conf.d/ by default, and make sure it’s readable.
    sudo mv pingdom_nagios.conf /etc/nagios3/conf.d/ sudo chown nagios:nagios /etc/nagios3/conf.d/pingdom_nagios.conf sudo chmod 660 /etc/nagios3/conf.d/pingdom_nagios.conf
  4. Open pingdom_nagios.conf in the editor of your choice.
  5. Replace PINGDOM_SERVICE_ID with your own Service ID created in step 4 above.
  6. Adjust the path in the command section to match where you placed pingdom_nagios.py (if you put it in /opt/pingdom you’re ok).
  7. Add the contact “pingdom” to your Nagios’ configuration main contact group. By default configuration, open /etc/nagios3/conf.d/contacts_nagios2.cfg and look for the “admins” contact group. Then, simply add the “pingdom” contact.
  8. If not already present, please add the following to the main nagios.cfg (/etc/nagios3/nagios.cfg):
    enable_environment_macros=1
  9. Restart Nagios.
    sudo service nagios3 restart
  10. Add the following to /etc/crontab, and again, adjust the path if you put the file elsewhere and verify that the user below is the same that your Nagios installation uses.
    * * * * * nagios /opt/pingdom/pingdom_nagios.py --send

Leave a Reply

Comments are moderated and not published in real time. All comments that are not related to the post will be removed.