Muokkaa

Jaa


Use Azure Alert Rules to monitor changes in Automatic Instance Repairs ServiceState

This article shows you how to use Alert Rules from Azure Monitor to receive custom notifications every time the ServiceState for Automatic Repairs is updated on your scale set. This will help track if Automatic Repairs become Suspended due to VM instances remaining unhealthy after multiple repair operations. To learn more about Azure Monitor alerts, see the alerts overview.

To follow this tutorial, ensure that you have a Virtual Machine scale set with Automatic Repairs enabled.

Azure portal

  1. In the portal, navigate to your VM scale set resource
  2. Select Alerts from the left pane, and then select + Create > Alert rule. Create monitoring alert in the Azure portal
  3. Under the Condition tab, select See all signals and choose the signal name called “Sets the state of an orchestration service in a Virtual Machine Scale set”. Select Apply. Select alert signal to monitor scale set orchestration service state
  4. Set Event Level to “Informational” and Status to “Succeeded”. Configure event level and status for alert rule
  5. Under the Actions tab, select an existing action group or see Create action group
  6. Under the Details tab > Alert rule name, set a name for your alert. Then select Review + create > Create to create your alert. Review and create alert rule

Once the alert is created and enabled on your scale set, you'll receive a notification every time a change to the ServiceState is detected on your scale set.

Sample email notification from alert rule

Below is an example of an email notification created from a configured alert rule. Sample email notification from alert rule

Creating an action group

  1. Under the Actions tab, select Create action group. Create action group on portal
  2. In the Basics tab, provide an Action group name and Display name.
  3. Under the Notifications tab > Notification type, select “Email/SMS message/Push/Voice”. Select the edit button to configure how you’d like to be notified. Configure notification type for action group
  4. Select Review + Create > Create