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 immense power to act on the alert to remediate it as well as 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 just 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 credential to send an email using O365 SMTP server. Users should have a valid O365 account before sending email using Azure automation.
- It is to be noted that this is just a demonstration. The runbook can also accept parameters and log analytics alerts and send...