Skip to content

Alerts - Container Registry Storage Used

Creates an alert for Azure Container Registry storage used.

Summary

Metric alert that fires when Azure Container Registry storage usage 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 containers_registry_storage_used 'br:geitbicepmodweucr01.azurecr.io/bicep/modules/alerts/containers_registry_storage_used:1.1.0' = {
  name: 'containers_registry_storage_used'
  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 The amount of storage used by the container registry. For a registry account, its the sum of capacity used by all the repositories within a registry. Its sum of capacity used by shared layers, manifest files, and replica copies in each of its repositories.
par_alert_name string Name of the alert required
par_alert_severity int Severity of alert {0,1,2,3,4} 3
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 PT5M
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. 429496729600
par_time_aggregation string How the data that is collected should be combined over time. Average
par_window_size 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. PT1H

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/containers_registry_storage_used:1.1.0
1.0.0 br/Euvic-Modules:alerts/containers_registry_storage_used:1.0.0