Skip to content

Commit 5d7a33d

Browse files
authored
Merge pull request #211982 from paulth1/five-articles-for-alerts
edit pass: Five articles for alerts
2 parents 8b53276 + 16e8c3c commit 5d7a33d

File tree

6 files changed

+289
-230
lines changed

6 files changed

+289
-230
lines changed

articles/azure-monitor/alerts/activity-log-alerts-webhook.md

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,43 @@
11
---
22
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.
44
ms.topic: conceptual
55
ms.date: 03/31/2017
66
---
77

88
# Webhooks for activity log alerts
9+
910
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.
1011

1112
For more information on activity log alerts, see how to [create Azure activity log alerts](./activity-log-alerts.md).
1213

1314
For information on action groups, see how to [create action groups](./action-groups.md).
1415

1516
> [!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)​.
1818
1919
## Authenticate the webhook
20+
2021
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`.
2122

2223
## Payload schema
23-
The JSON payload contained in the POST operation differs based on the payload's data.context.activityLog.eventSource field.
24+
25+
The JSON payload contained in the POST operation differs based on the payload's `data.context.activityLog.eventSource` field.
2426

2527
> [!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.
2729
>
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.
2931
>
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. So, the new field `Activity Log Event Description` contains the description that's part of the activity log event.
3133
>
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. Replace the `Description` property with the `Activity Log Event Description` property.
3335
>
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.
3537
>
36-
> In order to fill the new **"Description"** property, you can add a description in the alert rule definition.
37-
> ![Fired Activity Log Alerts](media/activity-log-alerts-webhook/activity-log-alert-fired.png)
38+
> To fill the new `Description` property, you can add a description in the alert rule definition.
39+
40+
> ![Screenshot that shows fired activity log alerts.](media/activity-log-alerts-webhook/activity-log-alert-fired.png)
3841
3942
### Common
4043

@@ -222,7 +225,7 @@ The JSON payload contained in the POST operation differs based on the payload's
222225
}
223226
```
224227

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). You can also learn how to [configure service health webhook notifications with your existing problem management solutions](../../service-health/service-health-alert-webhook-guide.md).
226229

227230
### ResourceHealth
228231

@@ -264,39 +267,40 @@ For specific schema details on service health notification activity log alerts,
264267

265268
| Element name | Description |
266269
| --- | --- |
267-
| status |Used for metric alerts. Always set to "activated" for activity log alerts. |
270+
| status |Used for metric alerts. Always set to `activated` for activity log alerts. |
268271
| context |Context of the event. |
269-
| resourceProviderName |The resource provider of the impacted resource. |
270-
| conditionType |Always "Event." |
272+
| resourceProviderName |The resource provider of the affected resource. |
273+
| conditionType |Always `Event`. |
271274
| name |Name of the alert rule. |
272275
| id |Resource ID of the alert. |
273276
| description |Alert description set when the alert is created. |
274277
| subscriptionId |Azure subscription ID. |
275278
| 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. |
278281
| properties |Set of `<Key, Value>` pairs (that is, `Dictionary<String, String>`) that includes details about the event. |
279282
| event |Element that contains metadata about the event. |
280283
| authorization |The Azure role-based access control properties of the event. These properties usually include the action, the role, and the scope. |
281-
| category |Category of the event. Supported values include Administrative, Alert, Security, ServiceHealth, and Recommendation. |
284+
| category |Category of the event. Supported values include `Administrative`, `Alert`, `Security`, `ServiceHealth`, and `Recommendation`. |
282285
| caller |Email address of the user who performed the operation, UPN claim, or SPN claim based on availability. Can be null for certain system calls. |
283-
| correlationId |Usually a GUID in string format. Events with correlationId belong to the same larger action and usually share a correlationId. |
286+
| correlationId |Usually a GUID in string format. Events with `correlationId` belong to the same larger action and usually share a `correlationId`. |
284287
| eventDescription |Static text description of the event. |
285288
| eventDataId |Unique identifier for the event. |
286289
| eventSource |Name of the Azure service or infrastructure that generated the event. |
287-
| 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. |
290+
| httpRequest |The request usually includes the `clientRequestId`, `clientIpAddress`, and HTTP method (for example, PUT). |
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. |
290293
| operationName |Name of the operation. |
291294
| properties |Properties of the event. |
292-
| status |String. Status of the operation. Common values include Started, In Progress, Succeeded, Failed, Active, and Resolved. |
293-
| subStatus |Usually includes the HTTP status code of the corresponding REST call. It might also include other strings that describe a substatus. Common substatus values include OK (HTTP Status Code: 200), Created (HTTP Status Code: 201), Accepted (HTTP Status Code: 202), No Content (HTTP Status Code: 204), Bad Request (HTTP Status Code: 400), Not Found (HTTP Status Code: 404), Conflict (HTTP Status Code: 409), Internal Server Error (HTTP Status Code: 500), Service Unavailable (HTTP Status Code: 503), and Gateway Timeout (HTTP Status Code: 504). |
295+
| status |String. Status of the operation. Common values include `Started`, `In Progress`, `Succeeded`, `Failed`, `Active`, and `Resolved`. |
296+
| subStatus |Usually includes the HTTP status code of the corresponding REST call. It might also include other strings that describe a substatus. Common substatus values include `OK` (HTTP Status Code: 200), `Created` (HTTP Status Code: 201), `Accepted` (HTTP Status Code: 202), `No Content` (HTTP Status Code: 204), `Bad Request` (HTTP Status Code: 400), `Not Found` (HTTP Status Code: 404), `Conflict` (HTTP Status Code: 409), `Internal Server Error` (HTTP Status Code: 500), `Service Unavailable` (HTTP Status Code: 503), and `Gateway Timeout` (HTTP Status Code: 504). |
294297

295298
For specific schema details on all other activity log alerts, see [Overview of the Azure activity log](../essentials/platform-logs-overview.md).
296299

297300
## Next steps
301+
298302
* [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).
300304
* [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.
301305
* [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.
302306
* [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

Comments
 (0)