- PagerDuty /
- Integrations /
- Munin Integration Guide
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
-
- From the Services menu, select Service Directory.
- 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.
- 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.
- Click the Add Service or Add Integration button to save your new integration. You will be redirected to the Integrations page for your service.
- 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.- Once Munin is installed, open your terminal and navigate to a directory where you can download the necessary files.
- Download the integration files:
wget -O pagerduty-python.tar.gz --no-check-certificate https://github.com/samuel/python-pagerduty/tarball/master
- Unzip the file.
tar -zxvf pagerduty-python.tar.gz
- Navigate into the directory:
cd samuel-python-pagerduty
- Either copy the file shown in https://gist.github.com/720925.git to this directory, or install git:
and then run:sudo apt-get install git
to retrieve the file inside the directory.git clone https://gist.github.com/720925.git
- Change this beginning of the pagerduty_munin.py file by removing the "if" conditional and substituting in your own service key. The Service API key substituted in should match that shown in Step 5 above.
- Save this file inside samuel-python-pagerduty as pagerduty_munin.py. To confirm, type ls and it should now appear inside your directory.
- Update permissions to make the file executable by Munin.
chmod 755 pagerduty_munin.py
- 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. Under 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.
- Restart Munin. On Ubuntu this can be done with:
sudo /etc/init.d/munin-node restart.sudo /etc/init.d/munin-node restart
- 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.Ready to get started?
Try any product on the Operations Cloud for free.
No credit card required.