One of the actions provided by a Log Analytics alert is to execute the Azure Automation runbook. This facility of executing runbooks on an alert provides the opportunity to act on the alert to remediate it and inform the relevant stakeholders using notifications.
- The first step in executing a runbook in response to an alert is to create an Azure Automation Account:
- After the account is provisioned, create a runbook, as shown in the following screenshot, to prove that it can be executed as part of the alert generation. In this case, the runbook sends an email as part of the notification. It uses Azure Automation credentials to send an email using the O365 SMTP server. Users should have a valid O365 account before sending an email using Azure Automation.
- It has to be noted that this is just a demonstration. The runbook can also accept parameters...