{
webTestId: 'string'
componentId: 'string'
failedLocationCount: int
}
Property values
The following tables describe the values you need to set in the schema.
Microsoft.Insights/metricAlerts object
Note
In Bicep, type and apiVersion are specified in the first line of the resource declaration. Use the format <type>@<apiVersion>. Don't set those properties in the resource body.
the description of the metric alert that will be included in the alert email.
severity
integer
Yes
Alert severity {0, 1, 2, 3, 4}
enabled
boolean
Yes
the flag that indicates whether the metric alert is enabled.
scopes
array
Yes
the list of resource id's that this metric alert is scoped to. - string
evaluationFrequency
string
Yes
how often the metric alert is evaluated represented in ISO 8601 duration format.
windowSize
string
Yes
the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
targetResourceType
string
No
the resource type of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
targetResourceRegion
string
No
the region of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
the flag that indicates whether the alert should be auto resolved or not. The default is true.
actions
array
No
the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - MetricAlertAction object
MetricAlertCriteria object
Name
Type
Required
Value
additionalProperties
object
No
Unmatched properties from the message are deserialized this collection
odata.type
string
Yes
specifies the type of the alert criteria. - Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria, Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria or Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria
the criteria operator. - Equals, NotEquals, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual
threshold
integer
Yes
the criteria threshold value that activates the alert.
timeAggregation
string
Yes
the criteria time aggregation types. - Average, Minimum, Maximum, Total
alertSensitivity
string
Yes
The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern. - Low, Medium, High
failingPeriods
object
Yes
The minimum number of violations required within the selected lookback time window required to raise an alert. - failingPeriods
ignoreDataBefore
string
No
Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)
WebtestLocationAvailabilityCriteria object
Name
Type
Required
Value
webTestId
string
Yes
The Application Insights web test Id.
componentId
string
Yes
The Application Insights resource Id.
failedLocationCount
integer
Yes
The number of failed locations.
MetricDimension object
Name
Type
Required
Value
name
string
Yes
Name of the dimension.
operator
string
Yes
the dimension operator. Only 'Include' and 'Exclude' are supported
values
array
Yes
list of dimension values.
FailingPeriods object
Name
Type
Required
Value
minFailingPeriodsToAlert
integer
Yes
The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods.
numberOfEvaluationPeriods
integer
Yes
The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points.
MetricAlertAction object
Name
Type
Required
Value
actionGroupId
string
No
the id of the action group to use.
webHookProperties
object
No
This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.
Quickstart templates
The following quickstart templates deploy this resource type.