Configurar notificaciones de monitorización para el crecimiento de repositorios
Organízate con las colecciones
Guarda y clasifica el contenido según tus preferencias.
En esta página se describe cómo crear una política de alertas que pueda avisarte cuando el crecimiento del repositorio de Artifact Registry supere un límite. Estas instrucciones son para la consola Google Cloud .
Para obtener más información sobre las políticas de alertas, consulta el resumen de las alertas.
Antes de empezar
Para obtener los permisos que necesitas para crear y modificar políticas de alertas mediante la consola, pide a tu administrador que te conceda el rol de gestión de identidades y accesos Editor de Monitoring (roles/monitoring.editor) en tu proyecto. Google Cloud
Para obtener más información sobre cómo conceder roles, consulta el artículo Gestionar el acceso a proyectos, carpetas y organizaciones.
Familiarízate con los conceptos generales de las políticas de alertas.
Para obtener información sobre estos temas, consulta el artículo Descripción general de las alertas.
Configura los canales de notificación que quieras usar para recibir notificaciones. Por motivos de redundancia, te recomendamos que crees varios tipos de canales de notificación. Para obtener más información, consulta cómo crear y gestionar canales de notificación.
Crear una política de alertas
Para recibir una notificación cuando el tamaño de tu repositorio de Artifact Registry supere un tamaño específico, crea una política de alertas. La política de alertas monitoriza el tamaño de tu repositorio y, cuando supera el umbral que especificas, se envían notificaciones a todos los canales de notificaciones asociados a la política de alertas.
Si usas la barra de búsqueda para encontrar esta página, selecciona el resultado cuya sección sea Monitorización.
Si no has creado tus canales de notificación y quieres recibir notificaciones, haz clic en Editar canales de notificación y añade tus canales de notificación. Vuelve a la página Alertas después de añadir tus canales.
En la página Alertas, selecciona Crear política.
Para seleccionar el recurso, la métrica y los filtros, despliega el menú Seleccionar una métrica y, a continuación, usa los valores de la tabla Nueva condición:
Opcional: Para limitar el menú a las entradas relevantes, introduce el nombre del recurso o de la métrica en la barra de filtros.
Selecciona un Tipo de recurso. Por ejemplo, selecciona Instancia de VM.
Seleccione una categoría de métrica. Por ejemplo, selecciona instancia.
Seleccione una métrica. Por ejemplo, selecciona Uso de CPU.
Selecciona Aplicar.
Haga clic en Siguiente y, a continuación, configure el activador de la política de alertas.
Para completar estos campos, usa los valores de la tabla Configurar activador de alerta.
Haz clic en Siguiente.
Opcional: Para añadir notificaciones a tu política de alertas, haz clic en Canales de notificación. En el cuadro de diálogo, selecciona uno o más canales de notificación y, luego, haz clic en Aceptar.
Para recibir notificaciones cuando se abran y se cierren incidentes, marca la opción Notificar cuando se cierre un incidente. De forma predeterminada, las notificaciones solo se envían cuando se abren incidentes.
Opcional: Actualiza la duración del cierre automático de incidentes. Este campo determina cuándo cierra Monitoring los incidentes si no hay datos de métricas.
Opcional: Haz clic en Documentación y añade la información que quieras incluir en las notificaciones.
Haz clic en Nombre de la alerta y escribe el que quieras asignar a la política de alertas.
Haz clic enCreate Policy (Crear política).
Campo Nueva condición
Valor
Recurso y métrica
En el menú Recursos, selecciona Repositorio de Artifact Registry.
En el menú Categorías de métricas, selecciona Repositorio.
En el menú Métricas, selecciona Tamaño del repositorio.
Para mostrar todos los tipos de métricas, incluso los que no tienen datos, haga clic en Activas. De forma predeterminada, los menús solo muestran los tipos de métricas con datos. Para obtener más información, consulta La métrica no aparece en el menú.
Filtro
Opcional.
Usa la etiqueta resource_container para recibir alertas de un proyecto o una organización. Para ello, introduce el ID del proyecto o de la organización.
Entre series temporales
Agregación de series temporales
none
Ventana de tiempo
Usar el valor predeterminado.
Función de ventana móvil
max
Configurar el activador de alertas Campo
Valor
Tipo de condición
Threshold
Activador de alerta
Any time series violates
Posición del umbral
Above threshold
Valor de umbral
Se define como el tamaño del repositorio en bytes que activa la alerta. Por ejemplo, para activar una alerta si el tamaño del repositorio supera los 0,5 GB, define el valor de umbral en 500000000.
Ventana de repetición de la prueba
El valor predeterminado es No retest. Con este ajuste, una sola medición puede generar una notificación. Para obtener más información y un ejemplo, consulta Ajustes de periodo y duración de la alineación.
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-08-21 (UTC)."],[[["\u003cp\u003eThis page provides instructions on creating an alerting policy in the Google Cloud console to monitor Artifact Registry repository growth and send notifications when a specified size threshold is exceeded.\u003c/p\u003e\n"],["\u003cp\u003eBefore creating an alerting policy, users need the Monitoring Editor IAM role, familiarity with alerting policy concepts, and configured notification channels.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves navigating to the Alerting page in the Google Cloud console, selecting "Create policy," and configuring the resource, metric, filters, and alert trigger.\u003c/p\u003e\n"],["\u003cp\u003eUsers can customize the alerting policy by adding notification channels, defining incident autoclose duration, adding documentation, and setting a specific threshold value to trigger alerts based on repository size.\u003c/p\u003e\n"],["\u003cp\u003eThe necessary configuration for monitoring the repository size is setting the Resource as Artifact Registry Repository, the Metric Category as Repository, the Metric as Repository size and setting the condition type to \u003ccode\u003eThreshold\u003c/code\u003e with the \u003ccode\u003eAbove Threshold\u003c/code\u003e position.\u003c/p\u003e\n"]]],[],null,["# Configure monitoring notifications for repository growth\n\nThis page describes how to create an alerting policy that can notify you when the\nArtifact Registry repository growth exceeds a limit. These\ninstructions are for the Google Cloud console.\n\nFor more information about alerting policies, see\n[Alerting overview](/monitoring/alerts).\n\nBefore you begin\n----------------\n\n1.\n\n To get the permissions that\n you need to create and modify alerting policies by using the Google Cloud console,\n\n ask your administrator to grant you the\n\n\n [Monitoring Editor](/iam/docs/roles-permissions/monitoring#monitoring.editor) (`roles/monitoring.editor`)\n IAM role on your project.\n\n\n For more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\n You might also be able to get\n the required permissions through [custom\n roles](/iam/docs/creating-custom-roles) or other [predefined\n roles](/iam/docs/roles-overview#predefined).\n\n For more information about Cloud Monitoring roles,\n see [Control access with Identity and Access Management](/monitoring/access-control).\n2. Ensure that you're familiar with the general concepts of alerting policies.\n For information about these topics, see\n [Alerting overview](/monitoring/alerts).\n\n3. Configure the notification channels that you want to use to receive any\n notifications. For redundancy purposes, we recommend that you create\n multiple types of notification channels. For more information, see\n [Create and manage notification channels](/monitoring/support/notification-options).\n\nCreate an alerting policy\n-------------------------\n\nTo get notified when your Artifact Registry repository size grows beyond a specific size,\ncreate an alerting policy. The alerting policy monitors the size of your repository and when that\nsize exceeds the threshold you specify, notifications are sent to all notification channels\nattached to the alerting policy.\n\n#### Steps to create an [alerting policy](/monitoring/alerts/using-alerting-ui#create-policy).\n\nTo create an alerting policy, do the following:\n\n1. In the Google Cloud console, go to the\n *notifications* **Alerting** page:\n\n [Go to **Alerting**](https://console.cloud.google.com/monitoring/alerting)\n\n \u003cbr /\u003e\n\n If you use the search bar to find this page, then select the result whose subheading is\n **Monitoring**.\n2. If you haven't created your notification channels and if you want to be notified, then click **Edit Notification Channels** and add your notification channels. Return to the **Alerting** page after you add your channels.\n3. From the **Alerting** page, select **Create policy**.\n4. To select the resource, metric, and filters, expand the **Select a metric** menu and then use the values in the **New condition** table:\n 1. Optional: To limit the menu to relevant entries, enter the resource or metric name in the filter bar.\n 2. Select a **Resource type** . For example, select **VM instance**.\n 3. Select a **Metric category** . For example, select **instance**.\n 4. Select a **Metric** . For example, select **CPU Utilization**.\n 5. Select **Apply**.\n5. Click **Next** and then configure the alerting policy trigger. To complete these fields, use the values in the **Configure alert trigger** table.\n6. Click **Next**.\n7. Optional: To add notifications to your alerting policy, click\n **Notification channels** . In the dialog, select one or more notification\n channels from the menu, and then click **OK**.\n\n To be notified when incidents are openend and closed, check\n **Notify on incident closure**. By default, notifications are sent only when\n incidents are openend.\n8. Optional: Update the **Incident autoclose duration**. This field determines when Monitoring closes incidents in the absence of metric data.\n9. Optional: Click **Documentation**, and then add any information that you want included in a notification message.\n10. Click **Alert name** and enter a name for the alerting policy.\n11. Click **Create Policy**.\n\nWhat's next\n-----------\n\n- To learn more about metric-threshold alerting policies, see [Create metric-threshold alerting policies](/monitoring/alerts/using-alerting-ui).\n- To view available Artifact Registry metrics, see [Google Cloud metrics](/monitoring/api/metrics_gcp_a_b#gcp-artifactregistry)"]]