Icinga-PagerDuty Integration via Chef
04 Mar 2013I wrote a Chef recipe for enabling PagerDuty support in Icinga. With luck, it'll be merged into Marius Ducea's icinga cookbook. The code is here.
Usage
Configure PagerDuty
Add a service for Icinga: 1. Go to https://your-domain.pagerduty.com/services/new 1. Set the service type to "Nagios" 1. Add the service
Configure your monitoring node
Add the
icinga::pagerduty
recipe to your rolename "monitoring" description "Monitoring server" run_list( "recipe[icinga]", "recipe[icinga::pagerduty]" )
Get the new PagerDuty service's API key
Copy it into your node attributes:
default_attributes({ :icinga => { :pagerduty => { :service_key => "318e318e318e318e318e318e318ead29cf" } })
Run chef-client
Watch alerts show up in PagerDuty
You should now see alerts like these:
PagerDuty will automatically resolve these incidents as Icinga sends recovery notifications. More details here.