Azure Monitor Alerts task

Azure DevOps Services

Use this task to configure alerts on available metrics for an Azure resource.

YAML snippet

# Azure Monitor alerts
# Configure alerts on available metrics for an Azure resource
- task: AzureMonitorAlerts@0
  inputs:
    azureSubscription: 
    resourceGroupName: 
    #resourceType: 'Microsoft.Insights/components' # Options: microsoft.Insights/Components, microsoft.Web/Sites, microsoft.Storage/StorageAccounts, microsoft.Compute/VirtualMachines
    resourceName: 
    alertRules: 
    #notifyServiceOwners: # Optional
    #notifyEmails: # Optional

Arguments

Argument Description
ConnectedServiceName
Azure Subscription
(Required) Select the Azure Resource Manager subscription.
Note: To configure new service connection, select the Azure subscription from the list and click Authorize. If your subscription is not listed or if you want to use an existing Service Principal, you can setup an Azure service connection using 'Add' or 'Manage' button.
Argument alias: azureSubscription
ResourceGroupName
Resource Group
(Required) Select the Azure Resource Group that contains the Azure resource where you want to configure an alert.
ResourceType
Resource Type
(Required) Select the Azure resource type.
Options: Microsoft.Insights/components, Microsoft.Web/sites, Microsoft.Storage/storageAccounts, Microsoft.Compute/virtualMachines
Default value: Microsoft.Insights/components
ResourceName
Resource name
(Required) Select name of Azure resource where you want to configure an alert.
AlertRules
Alert rules
(Required) List of Azure monitor alerts configured on selected Azure resource. To add or modify alerts, click on […] button.
NotifyServiceOwners
Subscription owners, contributors and readers
(Optional) Send email notification to everyone who has access to this resource group.
NotifyEmails
Additional administrator emails
(Optional) Add additional email addresses separated by semicolons(;) if you want to send email notification to additional people (whether or not you checked the "subscription owners..." box).

Open source

This task is open source on GitHub. Feedback and contributions are welcome.