Chef and Github integration documentation and use cases


(Akanksha Jain) #1

Is there any documentation showing how we can integrate PagerDuty with Chef and Github individually. I could not find any documentation on these integrations on pagerDuty.

(Christopher Morris) #2

The GitHub integration with PagerDuty uses the GitHub webhooks service to emit data to your integration. Once the integration is setup on your PagerDuty account, you should be able to view the new integration, by first navigating to your particular service, selecting integrations, and then clicking on the name for the newly added GitHub integration.

From there it will provide you with a URL to add to Github for emitting data. On the GitHub side, you will need to navigate to the repository of your choosing, select settings, webhooks, and then Add webhook. This will allow you to add a new webhook, with the integration URL from PagerDuty. The content-type should be application/json. Current PagerDuty only supports Issue based webhooks, so selecting Let me select individual events, followed by selecting Issues will ensure only issue related events are emitted to PagerDuty.

Whenever PagerDuty receives a new event from this webhook, it will parse specific fields in order to trigger or resolve your incident. All webhooks with the action of open will trigger a new incident, while all webhooks with the action of closed will resolve your incident. These will be deduped based on the github issue sending the webhook.

As for the chef integration, you will need to provide your chef setup with the Integration Email configured on your PagerDuty account. Once this is setup, editing your integration will provide you with a way to filter emails (accept all, or accept a subset of emails if they match a rule) followed by setting up rules to open and resolve incidents depending on what your chef setup may be emailing us.

Hope this helps!

(Akanksha Jain) #3

What defines an incident when it comes to chef integration? For eg in case of github creation of a new issue is an incident.

(Christopher Morris) #4

There are numerous factors which could define if the chef email should trigger an alert, incident, or both. In the Email Management portion of the integration we allow you to decide how to handle these cases.

Typically most people use the option of Open a new incident for each triggered email, however we do support other options for controlling triggers and resolves.

We do support more complex rules using regular expressions, detailed here should our other options not satisfy the information detailed in your chef emails.

(Akanksha Jain) #5

Are we talking about chef emails using libraries? Which chef emails are we talking about?

(Christopher Morris) #6

Correct. This would be one way of setting up chef to notify you of a failed run, and by the looks of it the chef supported way where additional configuration would not be required.

(Akanksha Jain) #7

You wrote

Do we have any documentation which shows how we can configure the chef setup with PagerDuty Integration Email ?

(Akanksha Jain) #8

I guess this will help ?

(Akanksha Jain) #9

I have created a service with github monitoring tool as integration type. There is an integration key in the intergations tab of the service but there is no URL to be added to github. I tried providing generic API url in the gthib webook payload URL section but it did not work. I keep getting {"status":"Unrecognized object","message":"Event object format is unrecognized","errors":["JSON parse error"]} It seems Github sends a predefined JSON body to PagerDuty and PagerDUty is not able to parse it. Also in webhook section there is a secret to be provided. Do we need to provide integration key there. I tried giving API key there but it still did not work.

(Ashley Brooks) #10

Hey Akanksha - I mentioned this in our support ticket, but to clarify on this thread as well:

The endpoint URL should be and you do not need to include a secret in order to use the integration. Please try updating the endpoint URL and let me know if you continue to see the JSON parse error. Additionally, I would recommend first starting with the Send me everything option. Once we get the integration working properly, you can specify for which events you’d like the webhook to fire.

(Akanksha Jain) #11

Thank you. Will wait for your update on this.

I did try with send me everything option and tried sending a push event . It is successfully sent from Github but not well received by PagerDuty. As disucssed over support ticket, I received the following error message from the support team Status: bad_input ErrorMsgs: [Missing field 'GH Event'] on pagerDuty.

(Ashley Brooks) #12

Akanksha followed up on our support ticket saying this issue is resolved after we pushed a fix out for the integration last week!

If you continue to see any issues with this integration, please feel free to follow up on this thread or email us at

(system) #13