November 16, 2022
November 1, 2022
Get to know how to use Azure Alert to monitor resources and triggers with the automation runbook.
Alerts proactively notify you when issues are found with your infrastructure or application using data monitor in Azure Monitor. The alert rule captures the target and criteria for alerting. The alert rule can be in an enabled or a disabled state.
When creating an alert rule, you need to specify the bellow key attributes:
Let’s try creating an Alert Rule to monitor activities and stop a virtual machine.
– Create a new VM in Resource Group
– Choose menu Alerts
– Click New Alert rule
Scope: Choose subscription and resource group
– Then click add condition to choose Signal Type as Activity Log and Signal Name as Deallocate Virtual Machine (Microsoft.Compute/virtualMachines)
– Click add Action Group > Create Action Group
– For the Notification Type, choose Email/SMS Message/Push/Voice
– Then click Review and Create
– You can power off the VM to check your new alert rule.
– The new Alert is generated based on the alert rule
– It also sends alert email notifications.
By using action groups to automate tasks based on the alert, you can trigger an Azure Automation runbook.
Here’s how to create a runbook to handle alerts.
– Go to your Azure Automation account:
– Create Automation Account
– Under Process Automation, select Runbooks > select + Create a runbook
– Choose Save > Publish runbook
– You can edit Alert Rule using > Add new action group for executing new runbook
– Then click Review + Create > Create > Save Rule
That is how you can manage alerts and trigger them with Automation Runbook in Microsoft Azure. If you are interested in DevOps, you can read more about critical DevOps metrics or learn more about how DevOps can benefit your business.
FABA Technology can provide your company with a comprehensive DevOps strategy to elevate your product’s flow and quality. Reach out to us for a free consultation here.