Query Azure Monitor Alerts task
Azure Pipelines | Azure DevOps Server 2019 | 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@1 inputs: connectedServiceNameARM: resourceGroupName: #filterType: 'none' # Options: resource, alertrule, none #resource: # Required when filterType == Resource #alertRule: # Required when filterType == Alertrule #severity: 'Sev0,Sev1,Sev2,Sev3,Sev4' # Optional. Options: sev0, sev1, sev2, sev3, sev4 #timeRange: '1h' # Optional. Options: 1h, 1d, 7d, 30d #alertState: 'Acknowledged,New' # Optional. Options: new, acknowledged, closed #monitorCondition: 'Fired' # Optional. Options: fired , resolved
|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.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.