DevOps | Scripts | Automation

Azure

How to get an email or SMS notification for Azure Service maintenance?

It’s an occasional occurrence that Azure plans maintenance for its services for improvement, bug fixes, additional features, etc and it could disrupt your prod / non-prod work and can cause an outage. You can receive advance notification through Email or SMS for their planned maintenance work.

Use Service Health

To get the email/SMS notification, follow the below steps.

  1. Open the Azure Portal and open Service Health.
  2. Click on the Planned Maintenance blade as shown below and there you will see the maintenance schedules planned in advance.
Planned Maintenance

3. Click on the add Service health alert.

Set Alert Target
  • Select the subscription that you wish to get notifications.
  • Click on Services dropbox to get a maintenance notification. By default, all services will be selected. Select services accordingly if you wish to select only Virtual Machine or Database maintenance.
  • Click on Regions and select Region that service is affected. For example, if you select Virtual Machine in Services and EastUS in Regions then if any planned maintenance for VM is scheduled in the EaseUS region then you will get the notification. Global will enable notification of selected services in all regions.
  • EventTypes: make sure Planned Maintenance is selected.

4. Create Action

This is the part where you can configure email/SMS notifications and for that, you need to attach the Action group to the event type.

Actions.

Actions will be based on the Action group you select or configure.

  • Click on Select Action Groups.
Select Action Group
  • As I have already an action group that sends the SMS for alerts. You can create a new action group by clicking on + Create Action Group. You can also use the email alerts if you wish.
  • To know more about creating and managing the action group, see the Microsoft documentation below.

https://docs.microsoft.com/en-us/azure/azure-monitor/alerts/action-groups

5. Add Alert Rule details

  • Once the Action is created, provide the rule details.
Action Rule Details

That’s it. Once you click Create, an alert rule will be created. Created rules can be found under, Alerts -> Health Alerts,

Health Alerts

To Edit, Delete, or Disabled alert rule, you can click on the 3 dots shown in the red circle.

Sample SMS:

Sample SMS

Loading