Get started with Opsgenie as a user
Learn how to configure your profile, get notifications from Opsgenie and view on-call schedules.
Use GitHub integration to forward events such as pull requests, issues, and push events to Opsgenie with detailed information. Opsgenie acts as a dispatcher for GitHub alerts, determines the right people to notify based on on-call schedules via email, text messages (SMS), phone calls, or iOS & Android push notifications, and escalates alerts until they are acknowledged or closed.
With a default configuration, the following is how the integration works:
When a pull request is created in your GitHub repository, an alert is created in Opsgenie.
When an issue is created in your GitHub repository, an alert is created in Opsgenie.
When a push is made to your GitHub repository, an alert is created in Opsgenie.
When a pull request is closed in your GitHub repository, the alert is closed in Opsgenie.
When an issue is closed in your GitHub repository, the alert is closed in Opsgenie.
You can define additional rules to suit your needs.
GitHub is an API-based integration. Setting it up involves the following steps:
Add a GitHub integration in Opsgenie
Configure the integration in GitHub
If you're using Opsgenie's Free or Essentials plan or if you’re using Opsgenie with Jira Service Management's Standard plan, you can add this integration from your team dashboard only. The Integrations page under Settings is not available in your plan.
Go to Teams and select your team.
Select Integrations on the left navigation and then select Add integration.
Adding the integration from your team dashboard will make your team the owner of the integration. This means Opsgenie will assign the alerts received through this integration to your team only. Follow the rest of the steps in this section to set up the integration.
To add a GitHub integration in Opsgenie:
Go to Settings > Integrations.
Select Add integration.
Run a search and select “Github”.
On the next screen, enter a name for the integration.
Optional: Select a team in Assignee team if you want a specific team to receive alerts from the integration.
Select Continue.
The integration is saved at this point.
Expand the Steps to configure the integration section and copy the Webhook URL generated for your account.
You will use this URL while configuring the integration in GitHub later.
Select Turn on integration.
The rules you create for the integration will work only if you turn on the integration.
1. In your GitHub repository, open the Settings tab at the top.
2. Select Webhooks from the left pane.
3. Select Add webhook.
4. Paste your Webhook URL (copied while adding the integration in Opsgenie) into the Payload URL field.
5. Select application/json for Content type.
6. Select Let me select individual events for Which events would you like to trigger this webhook?.
7. Select Push, Issues, and Pull request from the list. Leave the Active checkbox checked.
8. Select Add webhook.
When you save a Webhook configuration in GitHub, a test alert is created in Opsgenie. Learn more about GitHub Webhooks.
Was this helpful?