Skip to content

Commit 2fc6615

Browse files
Merge pull request #285704 from SnehaSudhirG/28Aug-AutomationUpdate
Edited the details about an example
2 parents cc2112b + 53458bb commit 2fc6615

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

articles/automation/automation-create-alert-triggered-runbook.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Use an alert to trigger an Azure Automation runbook
33
description: This article tells how to trigger a runbook to run when an Azure alert is raised.
44
services: automation
55
ms.subservice: process-automation
6-
ms.date: 12/15/2022
6+
ms.date: 08/28/2024
77
ms.topic: how-to
88
ms.custom: devx-track-azurepowershell
99
#Customer intent: As a developer, I want to trigger a runbook so that VMs can be stopped under certain conditions.
@@ -102,7 +102,7 @@ To use Automation with alerts, you need a runbook that manages the alert JSON pa
102102

103103
As described in the preceding section, each type of alert has a different schema. The script takes the webhook data from an alert in the `WebhookData` runbook input parameter. Then, the script evaluates the JSON payload to determine which alert type is being used.
104104

105-
This example uses an alert from an Azure virtual machine (VM). It retrieves the VM data from the payload, and then uses that information to stop the VM. The connection must be set up in the Automation account where the runbook is run. When using alerts to trigger runbooks, it's important to check the alert status in the runbook that is triggered. The runbook triggers each time the alert changes state. Alerts have multiple states, with the two most common being Activated and Resolved. Check for state in your runbook logic to ensure the runbook doesn't run more than once. The example in this article shows how to look for alerts with state Activated only.
105+
This example utilizes an alert from an Azure virtual machine (VM). It extracts the VM data from the payload, specifically from the target resource of the triggered alert, and then utilizes that information to stop the VM. The connection must be set up in the Automation account where the runbook is run. When using alerts to trigger runbooks, it's important to check the alert status in the runbook that is triggered. The runbook triggers each time the alert changes state. Alerts have multiple states, with the two most common being Activated and Resolved. Check for state in your runbook logic to ensure the runbook doesn't run more than once. The example in this article shows how to look for alerts with state Activated only.
106106

107107
The runbook uses the Automation account [system-assigned managed identity](./automation-security-overview.md#managed-identities) to authenticate with Azure to perform the management action against the VM. The runbook can be easily modified to use a user-assigned managed identity.
108108

0 commit comments

Comments
 (0)