Send Azure service health alerts with OpsGenie using webhooks
This article shows you how to set up Azure service health alerts with OpsGenie using a webhook. By using OpsGenie's Azure Service Health Integration, you can forward Azure Service Health alerts to OpsGenie. OpsGenie can determine the right people to notify based on on-call schedules, using email, text messages (SMS), phone calls, iOS & Android push notifications, and escalating alerts until the alert is acknowledged or closed.
Creating a service health integration URL in OpsGenie
Make sure you have signed up for and are signed into your OpsGenie account.
Navigate to the Integrations section in OpsGenie.
Select the Azure Service Health integration button.
Name your alert and specify the Assigned to Team field.
Fill out the other fields like Recipients, Enabled, and Suppress Notifications.
Copy and save the Integration URL, which should already contain your
apiKey
appended to the end.Select Save Integration
Create an alert using OpsGenie in the Azure portal
For a new action group:
Follow steps 1 through 8 in Create an alert on a service health notification for a new action group by using the Azure portal.
Define in the list of Actions:
a. Action Type: Webhook
b. Details: The OpsGenie Integration URL you previously saved.
c. Name: Webhook's name, alias, or identifier.
Select Save when done to create the alert.
For an existing action group:
In the Azure portal, select Monitor.
In the Settings section, select Action groups.
Find and select the action group you want to edit.
Add to the list of Actions:
a. Action Type: Webhook
b. Details: The OpsGenie Integration URL you previously saved.
c. Name: Webhook's name, alias, or identifier.
Select Save when done to update the action group.
Testing your webhook integration via an HTTP POST request
Create the service health payload you want to send. You can find an example service health webhook payload at Webhooks for Azure activity log alerts.
Create an HTTP POST request as follows:
POST https://api.opsgenie.com/v1/json/azureservicehealth?apiKey=<APIKEY> HEADERS Content-Type: application/json BODY <service health payload>
You should receive a
200 OK
response with the message of status "successful."Go to OpsGenie to confirm that your integration was set up successfully.
Next steps
- Learn how to configure webhook notifications for existing problem management systems.
- Review the activity log alert webhook schema.
- Learn about service health notifications.
- Learn more about action groups.