You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/alerts/activity-log-alerts-webhook.md
+21-17Lines changed: 21 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,40 +1,43 @@
1
1
---
2
2
title: Configure the webhook to get activity log alerts
3
-
description: Learn about the schema of the JSON that is posted to a webhook URL when an activity log alert activates.
3
+
description: Learn about the schema of the JSON that's posted to a webhook URL when an activity log alert activates.
4
4
ms.topic: conceptual
5
5
ms.date: 03/31/2017
6
6
---
7
7
8
8
# Webhooks for activity log alerts
9
+
9
10
As part of the definition of an action group, you can configure webhook endpoints to receive activity log alert notifications. With webhooks, you can route these notifications to other systems for post-processing or custom actions. This article shows what the payload for the HTTP POST to a webhook looks like.
10
11
11
12
For more information on activity log alerts, see how to [create Azure activity log alerts](./activity-log-alerts.md).
12
13
13
14
For information on action groups, see how to [create action groups](./action-groups.md).
14
15
15
16
> [!NOTE]
16
-
> You can also use the [common alert schema](./alerts-common-schema.md), which provides the advantage of having a single extensible and unified alert payload across all the alert services in Azure Monitor, for your webhook integrations. [Learn about the common alert schema definitions.](./alerts-common-schema-definitions.md)
17
-
17
+
> You can also use the [common alert schema](./alerts-common-schema.md) for your webhook integrations. It provides the advantage of having a single extensible and unified alert payload across all the alert services in Azure Monitor. [Learn about the common alert schema definitions](./alerts-common-schema-definitions.md).
18
18
19
19
## Authenticate the webhook
20
+
20
21
The webhook can optionally use token-based authorization for authentication. The webhook URI is saved with a token ID, for example, `https://mysamplealert/webcallback?tokenid=sometokenid&someparameter=somevalue`.
21
22
22
23
## Payload schema
24
+
23
25
The JSON payload contained in the POST operation differs based on the payload's data.context.activityLog.eventSource field.
24
26
25
27
> [!NOTE]
26
-
> Currently, the description that is part of the Activity log event is copied to the fired **"Alert Description"** property.
28
+
> Currently, the description that's part of the Activity Log event is copied to the fired `Alert Description` property.
27
29
>
28
-
> In order to align the Activity Log payload with other alert types, Starting April 1, 2021 the fired alert property **"Description"** will contain the alert rule description instead.
30
+
> To align the Activity Log payload with other alert types, as of April 1, 2021, the fired alert property `Description` contains the alert rule description instead.
29
31
>
30
-
> In preparation for this change, we created a new property**"Activity Log Event Description"** to the Activity Log fired Alert. This new property will be filled with the **"Description"** property that is already available for use. This means that the new field **"Activity Log Event Description"** will contain the description that is part of the Activity log event.
32
+
> In preparation for that change, we created a new property, `Activity Log Event Description`, to the Activity Log fired alert. This new property is filled with the `Description` property that's already available for use. This means that the new field `Activity Log Event Description` contains the description that's part of the Activity Log event.
31
33
>
32
-
> Please review your alert rules, action rules, webhooks, logic app or any other configurations where you might be using the **"Description"** property from the fired alert and replace it with **"Activity Log Event Description"** property.
34
+
> Review your alert rules, action rules, webhooks, logic app, or any other configurations where you might be using the `Description` property from the fired alert and replace it with the `Activity Log Event Description` property.
33
35
>
34
-
> if your condition (in your action rules, webhooks, logic app or any other configurations) is currently based on the **"Description"** property for activity log alerts, you may need to modify it to be based on the **"Activity Log Event Description"** property instead.
36
+
> If your condition (in your action rules, webhooks, logic app, or any other configurations) is currently based on the `Description` property for Activity Log alerts, you might need to modify it to be based on the `Activity Log Event Description` property instead.
35
37
>
36
-
> In order to fill the new **"Description"** property, you can add a description in the alert rule definition.
> To fill the new `Description` property, you can add a description in the alert rule definition.
39
+
40
+
> 
38
41
39
42
### Common
40
43
@@ -222,7 +225,7 @@ The JSON payload contained in the POST operation differs based on the payload's
222
225
}
223
226
```
224
227
225
-
For specific schema details on service health notification activity log alerts, see [Service health notifications](../../service-health/service-notifications.md). Additionally, learn how to [configure service health webhook notifications with your existing problem management solutions](../../service-health/service-health-alert-webhook-guide.md).
228
+
For specific schema details on service health notification activity log alerts, see [Service health notifications](../../service-health/service-notifications.md). In addition, you can learn how to [configure service health webhook notifications with your existing problem management solutions](../../service-health/service-health-alert-webhook-guide.md).
226
229
227
230
### ResourceHealth
228
231
@@ -266,15 +269,15 @@ For specific schema details on service health notification activity log alerts,
266
269
| --- | --- |
267
270
| status |Used for metric alerts. Always set to "activated" for activity log alerts. |
268
271
| context |Context of the event. |
269
-
| resourceProviderName |The resource provider of the impacted resource. |
272
+
| resourceProviderName |The resource provider of the affected resource. |
270
273
| conditionType |Always "Event." |
271
274
| name |Name of the alert rule. |
272
275
| id |Resource ID of the alert. |
273
276
| description |Alert description set when the alert is created. |
274
277
| subscriptionId |Azure subscription ID. |
275
278
| timestamp |Time at which the event was generated by the Azure service that processed the request. |
276
-
| resourceId |Resource ID of the impacted resource. |
277
-
| resourceGroupName |Name of the resource group for the impacted resource. |
279
+
| resourceId |Resource ID of the affected resource. |
280
+
| resourceGroupName |Name of the resource group for the affected resource. |
278
281
| properties |Set of `<Key, Value>` pairs (that is, `Dictionary<String, String>`) that includes details about the event. |
279
282
| event |Element that contains metadata about the event. |
280
283
| authorization |The Azure role-based access control properties of the event. These properties usually include the action, the role, and the scope. |
@@ -285,8 +288,8 @@ For specific schema details on service health notification activity log alerts,
285
288
| eventDataId |Unique identifier for the event. |
286
289
| eventSource |Name of the Azure service or infrastructure that generated the event. |
287
290
| httpRequest |The request usually includes the clientRequestId, clientIpAddress, and HTTP method (for example, PUT). |
288
-
| level |One of the following values: Critical, Error, Warning and Informational. |
289
-
| operationId |Usually a GUID shared among the events corresponding to single operation. |
291
+
| level |One of the following values: Critical, Error, Warning, and Informational. |
292
+
| operationId |Usually a GUID shared among the events corresponding to a single operation. |
290
293
| operationName |Name of the operation. |
291
294
| properties |Properties of the event. |
292
295
| status |String. Status of the operation. Common values include Started, In Progress, Succeeded, Failed, Active, and Resolved. |
@@ -295,8 +298,9 @@ For specific schema details on service health notification activity log alerts,
295
298
For specific schema details on all other activity log alerts, see [Overview of the Azure activity log](../essentials/platform-logs-overview.md).
296
299
297
300
## Next steps
301
+
298
302
*[Learn more about the activity log](../essentials/platform-logs-overview.md).
299
-
*[Execute Azure automation scripts (Runbooks) on Azure alerts](https://go.microsoft.com/fwlink/?LinkId=627081).
303
+
*[Execute Azure Automation scripts (Runbooks) on Azure alerts](https://go.microsoft.com/fwlink/?LinkId=627081).
300
304
*[Use a logic app to send an SMS via Twilio from an Azure alert](https://github.com/Azure/azure-quickstart-templates/tree/master/demos/alert-to-text-message-with-logic-app). This example is for metric alerts, but it can be modified to work with an activity log alert.
301
305
*[Use a logic app to send a Slack message from an Azure alert](https://github.com/Azure/azure-quickstart-templates/tree/master/demos/alert-to-slack-with-logic-app). This example is for metric alerts, but it can be modified to work with an activity log alert.
302
306
*[Use a logic app to send a message to an Azure queue from an Azure alert](https://github.com/Azure/azure-quickstart-templates/tree/master/demos/alert-to-queue-with-logic-app). This example is for metric alerts, but it can be modified to work with an activity log alert.
0 commit comments