This page describes how to create an alerting policy that can notify you when the Artifact Registry repository growth exceeds a limit. These instructions are for the Google Cloud console.
For more information about alerting policies, see Alerting overview.
Before you begin
-
To get the permissions that you need to create and modify alerting policies by using the Google Cloud console, ask your administrator to grant you the Monitoring Editor (
roles/monitoring.editor
) IAM role on your project. For more information about granting roles, see Manage access to projects, folders, and organizations.You might also be able to get the required permissions through custom roles or other predefined roles.
For more information about Cloud Monitoring roles, see Control access with Identity and Access Management.
Ensure that you're familiar with the general concepts of alerting policies. For information about these topics, see Alerting overview.
Configure the notification channels that you want to use to receive any notifications. For redundancy purposes, we recommend that you create multiple types of notification channels. For more information, see Create and manage notification channels.
Create an alerting policy
To get notified when your Artifact Registry repository size grows beyond a specific size, create an alerting policy. The alerting policy monitors the size of your repository and when that size exceeds the threshold you specify, notifications are sent to all notification channels attached to the alerting policy.
New condition Field |
Value |
---|---|
Resource and Metric | In the Resources menu, select Artifact Registry Repository. In the Metric categories menu, select Repository. In the Metrics menu, select Repository size. To show all metric types, even those without data, click Active. By default, the menus only show metric types with data. For more information, see Metric not listed in menu. |
Filter | Optional.
|
Across time series Time series aggregation |
none |
Rolling window | Use default. |
Rolling window function | max |
Configure alert trigger Field |
Value |
---|---|
Condition type | Threshold |
Alert trigger | Any time series violates |
Threshold position | Above threshold |
Threshold value | Set to the size of the repository in bytes that triggers the alert. For example, to trigger an
alert if repository size grows larger than 0.5GB, set the threshold value to 500000000 . |
Retest window | The default value is No retest . With this setting, a single measurement can result in a
notification. For more information and an example, see
Alignment period and duration settings. |
What's next
- To learn more about metric-threshold alerting policies, see Create metric-threshold alerting policies.
- To view available Artifact Registry metrics, see Google Cloud metrics