Skip to content

Alerts - Container Apps Restart Count

Creates an alert for Container Apps Restart Count.

Summary

Metric alert that fires when the Container Apps restart count exceeds the configured threshold.

Module Information

Property Value
Owner platform-team
Support Support
Version 1.1.0

Resource Types

Resource Type
Microsoft.Insights/metricAlerts
Microsoft.Resources/deployments

Usage

module container_apps_restart_count 'br:geitbicepmodweucr01.azurecr.io/bicep/modules/alerts/container_apps_restart_count:1.1.0' = {
  name: 'container_apps_restart_count'
  params: {
    // Required parameters
    par_alert_name: <string>
    par_target_resource_id: <array>
    par_target_resource_region: <string>
    par_target_resource_type: <string>
  }
}

Parameters

Name Type Description Default
par_alert_description string Description of alert Restart count of container app replicas
par_alert_name string Name of the alert required
par_alert_severity int Severity of alert {0,1,2,3,4} 2
par_auto_mitigate bool Whether the alert resolves itself once the metric returns below the threshold. Defaults to true, which is also the service default; leaving the property unset produces an alert that stays fired until someone closes it by hand. True
par_current_date_time_utc_now string "The current date and time using the utcNow function. Used for deployment name uniqueness [utcNow()]
par_evaluation_frequency string how often the metric alert is evaluated represented in ISO 8601 duration format PT1M
par_is_enabled bool Specifies whether the alert is enabled True
par_operator string Operator comparing the current value with the threshold value. GreaterThan
par_target_resource_id array Array of Azure resource Ids. For example - /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroup/resource-group-name/Microsoft.compute/virtualMachines/vm-name required
par_target_resource_region string Azure region in which target resources to be monitored are in (without spaces). For example: EastUS required
par_target_resource_type string Resource type of target resources to be monitored. required
par_telemetry_opt_out string The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry. No
par_threshold int The threshold value at which the alert is activated. 3
par_time_aggregation string How the data that is collected should be combined over time. Maximum
windowSize string Period of time used to monitor alert activity based on the threshold. Must be between one minute and one day. ISO 8601 duration format. PT5M

Outputs

Name Type Description
out_metric_alert_id string Resource ID of the metric alert created on the target registry.
out_metric_alert_name string Name of the metric alert created on the target registry.

Versions

Pin an exact version. Ranges are not supported.

Version Reference
1.1.0 (latest) br/Euvic-Modules:alerts/container_apps_restart_count:1.1.0
1.0.0 br/Euvic-Modules:alerts/container_apps_restart_count:1.0.0