Query Azure Monitor Alerts task
Azure Pipelines | TFS 2018 | TFS 2017
Use this task in a release pipeline to observe the configured Azure monitor rules for active alerts.
Can be used in only an agentless job of a release pipeline.
In Microsoft Team Foundation Server (TFS) 2018 and previous versions, build and release pipelines are called definitions, service connections are called service endpoints, stages are called environments, and jobs are called phases.
# Query Azure Monitor Alerts # Observe the configured Azure monitor rules for active alerts. - task: AzureMonitor@0 inputs: connectedServiceNameARM: resourceGroupName: #resourceType: 'Microsoft.Insights/components' # Options: microsoft.Insights/Components, microsoft.Web/Sites, microsoft.Storage/StorageAccounts, microsoft.Compute/VirtualMachines resourceName: alertRules:
|Azure subscription||Required. Select an Azure Resource Manager service connection.|
|Resource group||Required. The resource group being monitored in the subscription.|
|Resource type||Required. Select the resource type in the selected group.|
|Resource name||Required. Select the resources of the chosen types in the selected group.|
|Alert rules||Required. Select from the currently configured alert rules to query for status.|
|Control options||See Control options|
Succeeds if none of the alert rules are activated at the time of sampling.
For more information about using this task, see Approvals and gates overview.
Also see this task on GitHub.