|
1 | 1 | ---
|
2 | 2 | title: Create activity log alerts for labs
|
3 |
| -description: This article provides steps to create activity log alerts for lab in Azure DevTest Labs. |
| 3 | +description: Learn how to create activity log alerts and configure alert rules for labs in Azure DevTest Labs. |
4 | 4 | ms.topic: how-to
|
5 | 5 | ms.author: rosemalcolm
|
6 | 6 | author: RoseHJM
|
7 |
| -ms.date: 07/10/2020 |
| 7 | +ms.date: 04/30/2024 |
8 | 8 | ms.custom: UpdateFrequency2
|
| 9 | + |
| 10 | +#customer intent: As a lab administrator, I want to create activity log alerts for labs in Azure DevTest Labs, so that I can respond to issues quickly. |
9 | 11 | ---
|
10 | 12 |
|
11 | 13 | # Create activity log alerts for labs in Azure DevTest Labs
|
12 |
| -This article explains how to create activity log alerts for labs in Azure DevTest Labs (for example: when a VM is created or when a VM is deleted). |
| 14 | +This article explains how to create activity log alerts for labs in Azure DevTest Labs (for example: when a virtual machine is created or deleted). |
| 15 | + |
| 16 | +## Create an alert |
13 | 17 |
|
14 |
| -## Create alerts |
15 | 18 | In this example, you create an alert for all administrative operations on a lab with an action that sends an email to subscription owners.
|
16 | 19 |
|
17 | 20 | 1. Sign in to the [Azure portal](https://portal.azure.com).
|
18 |
| -1. In the search bar of the Azure portal, type **Monitor**, and then select **Monitor** from the results list. |
19 | 21 |
|
20 |
| - :::image type="content" source="./media/activity-logs/search-monitor.png" alt-text="Search for Monitor"::: |
21 |
| -1. Select **Alerts** on the left menu, and then select **New alert rule** on the toolbar. |
| 22 | +1. In the Azure portal search bar, enter *Monitor*, and then select **Monitor** from the results list. |
| 23 | + |
| 24 | + :::image type="content" source="./media/create-alerts/search-monitor.png" alt-text="Screenshot of the Azure portal, showing a search for Monitor." lightbox="./media/create-alerts/search-monitor.png"::: |
| 25 | + |
| 26 | +1. Select **Alerts** on the left menu, and then select **Create** > **Alert rule**. |
| 27 | + |
| 28 | + :::image type="content" source="./media/create-alerts/alerts-page.png" alt-text="Screenshot showing the Azure Monitor alerts page with Create Alert rule highlighted." lightbox="./media/create-alerts/alerts-page.png"::: |
| 29 | + |
| 30 | +1. On the **Create alert rule** page, in **Select a resource**, from the **Resource types** list, select **DevTest Labs**. |
| 31 | + |
| 32 | + :::image type="content" source="./media/create-alerts/select-resource-link.png" alt-text="Screenshot showing the Select a resource pane, with the Resource type set to DevTest Labs." lightbox="./media/create-alerts/select-resource-link.png"::: |
22 | 33 |
|
23 |
| - :::image type="content" source="./media/activity-logs/alerts-page.png" alt-text="Alerts page"::: |
24 |
| -1. On the **Create alert rule** page, click **Select resource**. |
| 34 | +1. Expand your resource group, select your lab in the list, and then select **Apply**. |
25 | 35 |
|
26 |
| - :::image type="content" source="./media/activity-logs/select-resource-link.png" alt-text="Select resource for the alert"::: |
27 |
| -1. Select **DevTest Labs** for **Filter by resource type**, select your lab in the list, and then select **Done**. |
| 36 | + :::image type="content" source="./media/create-alerts/select-lab-resource.png" alt-text="Screenshot showing the Select a resource pane, with a lab selected." lightbox="./media/create-alerts/select-lab-resource.png"::: |
28 | 37 |
|
29 |
| - :::image type="content" source="./media/activity-logs/select-lab-resource.png" alt-text="Select your lab as the resource"::: |
30 |
| -1. Back on the **Create alert rule** page, click **Select condition**. |
| 38 | +1. Back on the **Create alert rule** page, select **Next: Condition**. |
31 | 39 |
|
32 |
| - :::image type="content" source="./media/activity-logs/select-condition-link.png" alt-text="Select condition link"::: |
33 |
| -1. On the **Configure signal logic** page, select a signal supported by DevTest Labs. |
| 40 | +1. On the **Condition** tab, select **See all signals**. |
34 | 41 |
|
35 |
| - :::image type="content" source="./media/activity-logs/select-signal.png" alt-text="Select signal"::: |
36 |
| -1. Filter by **event level** (Verbose, Informational, Warning, Error, Critical, All), **status** (Failed, Started, Succeeded), and **who initiated** the event. |
37 |
| -1. Select **Done** to complete configuring the condition. |
| 42 | + :::image type="content" source="./media/create-alerts/see-all-signals-link.png" alt-text="Screenshot of the Condition tab, with the See all signals link highlighted." lightbox="./media/create-alerts/see-all-signals-link.png"::: |
38 | 43 |
|
39 |
| - :::image type="content" source="./media/activity-logs/configure-signal-logic-done.png" alt-text="Configure signal logic - done"::: |
40 |
| -1. You have specified for the scope (lab) and the condition for the alert. Now, you need to specify an action group with actions to be run when the condition is met. Back on the **Create alert rule** page, choose **Select action group**. |
| 44 | +1. On the **Select a signal** pane, select **All Administrative operations**, and then select **Apply**. |
41 | 45 |
|
42 |
| - :::image type="content" source="./media/activity-logs/select-action-group-link.png" alt-text="Select action group link"::: |
43 |
| -1. Select **Create action group** link on the toolbar. |
| 46 | + :::image type="content" source="./media/create-alerts/all-administrative-operations.png" alt-text="Screenshot of the Select a signal pane, with All Administrative operations highlighted." lightbox="./media/create-alerts/all-administrative-operations.png"::: |
44 | 47 |
|
45 |
| - :::image type="content" source="./media/activity-logs/create-action-group-link.png" alt-text="Create action group link"::: |
46 |
| -1. On the **Add action group** page, follow these steps: |
47 |
| - 1. Enter a **name** for the action group. |
48 |
| - 1. Enter a **short name** for the action group. |
49 |
| - 1. Select the **resource group** in which you want the alert to be created. |
50 |
| - 1. Enter a **name for the action**. |
51 |
| - 1. Select the **action type** (in this example, **Email Azure Resource Manager Role**). |
| 48 | +1. Select **Next: Actions**. |
52 | 49 |
|
53 |
| - :::image type="content" source="./media/activity-logs/add-action-group.png" alt-text="Add action group page"::: |
54 |
| - 1. On the **Email Azure Resource Manager Role** page, select the role. In this example, it's **Owner**. Then, select **OK**. |
| 50 | +1. On the **Actions** tab, ensure **Use quick actions (preview)** is selected. |
| 51 | + |
| 52 | +1. On the **Use quick actions (preview)** pane, enter or select the following information, and then select **Save**. |
| 53 | + |
| 54 | + |Name |Value | |
| 55 | + |---------|---------| |
| 56 | + |Action group name |Enter an action group name that is unique within the resource group | |
| 57 | + |Display name |Enter a display name to be shown as the action group name in email and SMS notifications. | |
| 58 | + |Email | Enter an email address to receive alerts. | |
| 59 | + |Email Azure Resource Manager Role | Select an Azure Resource Manager role to receive alerts. | |
| 60 | + |Azure mobile app notification | Get a push notification on the Azure mobile app. | |
| 61 | + |
| 62 | + :::image type="content" source="./media/create-alerts/quick-actions-preview.png" alt-text="Screenshot showing the Use quick actions (preview) pane." lightbox="./media/create-alerts/quick-actions-preview.png"::: |
55 | 63 |
|
56 |
| - :::image type="content" source="./media/activity-logs/select-role.png" alt-text="Select role"::: |
57 |
| - 1. Select **OK** on the **Add action group** page. |
58 |
| -1. Now, on the **Create alert rule** page, enter a name for the alert rule, and then select **OK**. |
| 64 | +1. On the **Create an alert rule** page, enter a name for the alert rule, and then select **Review + create**. |
| 65 | + |
| 66 | + :::image type="content" source="./media/create-alerts/details-alert-name.png" alt-text="Screenshot showing the Create an alert rule tab, with Alert rule name highlighted." lightbox="./media/create-alerts/details-alert-name.png"::: |
| 67 | + |
| 68 | +1. On the **Review + create** tab, review the settings, and then select **Create**. |
| 69 | + |
| 70 | + :::image type="content" source="./media/create-alerts/alert-review-create.png" alt-text="Screenshot showing the Review and create tab, with Create highlighted." lightbox="./media/create-alerts/alert-review-create.png"::: |
59 | 71 |
|
60 |
| - :::image type="content" source="./media/activity-logs/create-alert-rule-done.png" alt-text="Create alert rule - done"::: |
61 | 72 |
|
62 | 73 | ## View alerts
|
63 |
| -1. You will see alerts on the **Alerts** for all administrative operations (in this example). Alerts may take sometime to show up. |
64 | 74 |
|
65 |
| - :::image type="content" source="./media/activity-logs/alerts.png" alt-text="Screen capture displays alerts in the Dashboard."::: |
66 |
| -1. If you select number in a column (for example: **Total alerts**), you see the alerts that were raised. |
| 75 | +1. You see alerts on the **Alerts** for all administrative operations (in this example). Alerts can take sometime to show up. |
| 76 | + |
| 77 | + :::image type="content" source="./media/create-alerts/alerts.png" alt-text="Screenshot showing the Alerts page with the full list of alerts." lightbox="./media/create-alerts/alerts.png"::: |
| 78 | + |
| 79 | +1. To view all alerts of a specific severity, select the number in the relevant column (for example: **Warning**). |
| 80 | + |
| 81 | + :::image type="content" source="./media/create-alerts/select-type-alert.png" alt-text="Screenshot showing the Alerts page with the Warning column heading highlighted." lightbox="./media/create-alerts/select-type-alert.png"::: |
| 82 | + |
| 83 | +1. To view the details of an alert, select the alert. |
| 84 | + |
| 85 | + :::image type="content" source="./media/create-alerts/select-alert.png" alt-text="Screenshot showing the Alerts page with the full list of alerts and one alert name highlighted." lightbox="./media/create-alerts/select-alert.png"::: |
| 86 | + |
| 87 | +1. You see a details pane like the following screenshot: |
67 | 88 |
|
68 |
| - :::image type="content" source="./media/activity-logs/all-alerts.png" alt-text="All alerts"::: |
69 |
| -1. If you select an alert, you see details about it. |
| 89 | + :::image type="content" source="./media/create-alerts/alert-details.png" alt-text="Screenshot showing the alert details." lightbox="./media/create-alerts/alert-details.png"::: |
70 | 90 |
|
71 |
| - :::image type="content" source="./media/activity-logs/alert-details.png" alt-text="Alert details"::: |
72 |
| -1. In this example, you also receive an email with content as shown in the following example: |
| 91 | +1. If you configured the alert to send an email notification, you receive an email that contains a summary of the error and a link to view the alert. |
73 | 92 |
|
74 |
| - :::image type="content" source="./media/activity-logs/alert-email.png" alt-text="Alert email"::: |
| 93 | +## Related content |
75 | 94 |
|
76 |
| -## Next steps |
77 | 95 | - To learn more about creating action groups using different action types, see [Create and manage action groups in the Azure portal](../azure-monitor/alerts/action-groups.md).
|
78 | 96 | - To learn more about activity logs, see [Azure Activity Log](../azure-monitor/essentials/activity-log.md).
|
79 | 97 | - To learn about setting alerts on activity logs, see [Alerts on activity log](../azure-monitor/alerts/activity-log-alerts.md).
|
0 commit comments