Munin Integration Guide

Munin is written in Perl and uses RRDtool for graphing. As part of its master/node architecture, the master connects to nodes periodically and queries them for data. Over 500 monitoring plugins are currently available.Munin is relatively simple to install on most Unix systems; on Ubuntu, for instance, Munin can be up and running in under 10 lines.Munin can be integrated with PagerDuty through a both a generic email and API integration; this guide will walk you through the API configuration. The simpler email integration is explained in the FAQ below.If you are having trouble completing the installation, please contact us.

In PagerDuty

    1. From the Services menu, select Service Directory.
    2. On your Service Directory page:If you are creating a new service for your integration, click +New Service.

      If you are adding your integration to an existing service, click the name of the service you want to add the integration to. Then click the Integrations tab and click the Add a new integration this service link.

    3. Select your app from the Integration Type menu and enter an Integration Name.

      If you are creating a new service for your integration, in General Settings, enter a Name for your new service. Then, in Incident Settings, specify the Escalation Policy, Notification Urgency, and Incident Behavior for your new service.

    4. Click the Add Service or Add Integration button to save your new integration. You will be redirected to the Integrations page for your service.
    5. Copy the Integration Key for your new integration:

In Munin

This installation demonstration takes place on an AWS Ubuntu machine. For other flavors of Unix, your experience may vary.

  1. Once Munin is installed, open your terminal and navigate to a directory where you can download the necessary files.
  2. Download the integration files:
    wget -O pagerduty-python.tar.gz --no-check-certificate https://github.com/samuel/python-pagerduty/tarball/master
  3. Unzip the file.
    tar -zxvf pagerduty-python.tar.gz
  4. Navigate into the directory:
    cd samuel-python-pagerduty
  5. Either copy the file shown in https://gist.github.com/720925.git to this directory, or install git:
    sudo apt-get install git

    and then run:

    git clone https://gist.github.com/720925.git

    to retrieve the file inside the directory.

  6. Change this beginning of the pagerduty_munin.py file by removing the “if” conditional and substituting in your own service key.
    mupy_original_changes
    The Service API key substituted in should match that shown in Step 5 above.
    munin_changed
  7. Save this file inside samuel-python-pagerduty as pagerduty_munin.py. To confirm, type ls and it should now appear inside your directory.
    mupy
  8. Update permissions to make the file executable by Munin.
    chmod 755 pagerduty_munin.py
  9. Open your munin.conf file. (On Ubuntu, this can be found by typing cd /etc/munin, then sudo vi munin.conf). At the bottom of the file, add two contact.me lines, including the path to to your samuel-python-pagerduty/pagerduty_munin.py files.
    contact_meUnder the monitored-node section, add contacts me, and change the load warning to a very low setting to trigger a test alert, in order to demonstrate that the integration is working.
    contacts_me_trigger_conditions
  10. Restart Munin. On Ubuntu this can be done with:
    sudo /etc/init.d/munin-node restart.sudo /etc/init.d/munin-node restart
  11. Log into PagerDuty. If everything is working correctly, you should see your first alert.

FAQ

Can I set up Munin to work with multiple PagerDuty services?

No; you can only associate your Munin file settings with one PagerDuty service at a time.

If something is resolved in Munin, is it also resolved in PagerDuty?

No, it is not; you have to resolve the incident separately in PagerDuty.

It doesn’t seem to be working. What’s going on?

Setting up Munin requires some working knowledge of UNIX and various system details. Check your logs and feel free to contact us if you’re unable to sort out the difficulty.

The API integration isn’t working for me and/or I want to integrate by email instead. What should I do?

An walkthrough of the email integration can be found here. In summary, you add an email address to munin.conf, then install sendmail. On Ubuntu, this can be done with the following command: sudo apt-get install sendmail.

Start Using PagerDuty Today

Try PagerDuty free for 14 days — no credit card required.

SIGN UP