Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En esta página, se proporcionan instrucciones detalladas para consultar y visualizar alertas abiertas con la consola de GDC y la herramienta curl para el extremo de Cortex, de modo que puedas conocer los problemas y resolverlos.
Después de crear reglas de alertas basadas en registros y métricas de los entornos aislados de Google Distributed Cloud (GDC), puedes comenzar a supervisar las alertas abiertas de tu proyecto. Puedes visualizar y filtrar las alertas que activan los eventos del sistema en la consola de GDC, o bien acceder a ellas directamente desde Cortex con la herramienta curl para una programación y automatización flexibles.
Puedes acceder a las alertas abiertas con uno de los siguientes dos métodos:
Consola de GDC: Visualiza los datos de las alertas en paneles integrados que contienen información como la cantidad de alertas para una fuente de datos específica, el nivel de gravedad, la duración, el estado, el mensaje y las etiquetas. La consola de GDC proporciona una interfaz fácil de usar para filtrar y analizar las alertas de los componentes del sistema.
Extremo de Cortex Alertmanager: Para casos de uso más avanzados, consulta directamente la instancia de Cortex de tu proyecto con la herramienta curl en una línea de comandos.
Cortex almacena las alertas de Alertmanager de tu proyecto y proporciona un extremo HTTP para el acceso programático. Este acceso te permite exportar datos, automatizar tareas, configurar trabajos cron y crear integraciones personalizadas.
Antes de comenzar
Para obtener los permisos que necesitas para consultar y visualizar alertas, pídele al administrador de IAM del proyecto que te otorgue uno de los roles asociados de Alertmanager de Project Cortex en el espacio de nombres de tu proyecto. Según el nivel de acceso y los permisos que necesites, es posible que obtengas roles de editor o visualizador para este recurso en un proyecto.
En el menú de navegación, selecciona Operations>Alerting.
Selecciona la pestaña Alertas.
Consulta la lista de alertas.
En la sección Alertas abiertas, haz clic en Filtrar para mostrar solo las alertas abiertas. También puedes filtrar las alertas por otros nombres o valores de propiedades.
Haz clic en el nombre de una alerta para ver sus detalles.
Extremo de Cortex
En esta sección, se describe cómo acceder a las alertas con tu extremo de Cortex Alertmanager.
Identifica tu extremo de Cortex
La siguiente URL es el extremo de la instancia de Cortex de tu proyecto:
Usa tu nombre de usuario y contraseña para autenticarte y acceder.
Cuando el acceso sea exitoso, podrás usar el encabezado de autorización en tu solicitud de cURL a través del comando gdcloud auth print-identity-token. Para obtener más información, consulta gcloud auth.
Llama al extremo de Cortex
Completa los siguientes pasos para acceder al extremo de Cortex con la herramienta curl:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[[["\u003cp\u003eThis guide explains how to monitor open alerts in Google Distributed Cloud (GDC) air-gapped environments, which are triggered by system events from logs and metrics.\u003c/p\u003e\n"],["\u003cp\u003eYou can access and visualize alerts either through the user-friendly GDC console, which offers filtering capabilities, or directly via the Cortex Alertmanager endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe Cortex endpoint, accessible via the \u003ccode\u003ecurl\u003c/code\u003e tool, provides programmatic access to alerts, enabling automation, scripting, and custom integrations for more advanced use cases.\u003c/p\u003e\n"],["\u003cp\u003eTo access the alerts, you will need to first acquire the necessary Project Cortex Alertmanager roles from your Project IAM Admin, either as a viewer or editor.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecurl\u003c/code\u003e tool requires authentication through the \u003ccode\u003egdcloud\u003c/code\u003e CLI using your username and password, to be able to access the cortex endpoint.\u003c/p\u003e\n"]]],[],null,["# Query and view open alerts\n\nThis page provides detailed instructions on how to query and visualize open\nalerts using both the GDC console and the `curl` tool for the Cortex\nendpoint to gain issue awareness and resolve problems.\n\nAfter [creating alert rules](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/create-alert-rules)\nbased on logs and metrics from Google Distributed Cloud (GDC) air-gapped environments, you\ncan start monitoring open alerts from your project. You can visualize and filter\nalerts that your system events trigger on the GDC console or access\nthem directly from Cortex using the `curl` tool for flexible scripting and\nautomation.\n\nYou can access open alerts in one of the following two methods:\n\n- **GDC console**: Visualize alerting data in integrated panels containing information like the number of alerts for a specific data source, the severity level, duration, status, message, and labels. The GDC console provides a user-friendly interface for filtering and analyzing alerts from your system components.\n- **Cortex Alertmanager endpoint** : For more advanced use cases, query your project's Cortex instance directly using the `curl` tool on a command line. Cortex stores your project's Alertmanager alerts and provides an HTTP endpoint for programmatic access. This access lets you export data, automate tasks, configure cron jobs, and build custom integrations.\n\nBefore you begin\n----------------\n\nTo get the permissions that you need to query and visualize alerts, ask your\nProject IAM Admin to grant you one of the associated Project Cortex Alertmanager\nroles in your project namespace. Depending on the level of access and\npermissions you need, you might obtain editor or viewer roles for this resource\nin a project.\n\nFor more information about these roles, see\n[Prepare IAM permissions](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/obs-iam-permissions).\n\nView and filter open alerts\n---------------------------\n\nSelect one of the following methods to query and filter open alerts from your\nproject namespace: \n\n### Console\n\nView the open alerts in a project from the GDC console:\n\n1. [Sign in to the GDC console](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/iam/sign-in).\n2. In the GDC console, select your project.\n3. In the navigation menu, select **Operations** \\\u003e **Alerting**.\n4. Select the **Alerts** tab.\n5. View the list of alerts.\n6. On the **Alerts opened** section, click **Filter** to only display open alerts. You can also filter alerts by other property names or values.\n7. Click an alert name to view the alert details.\n\n### Cortex endpoint\n\nThis section describes how to access alerts using your Cortex Alertmanager\nendpoint.\n\n#### Identify your Cortex endpoint\n\nThe following URL is the endpoint of the Cortex instance of your project: \n\n https://\u003cvar translate=\"no\"\u003eGDC_URL\u003c/var\u003e/\u003cvar translate=\"no\"\u003ePROJECT_NAMESPACE\u003c/var\u003e/cortex/alertmanager/\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eGDC_URL\u003c/var\u003e: the URL of your organization in GDC.\n- \u003cvar translate=\"no\"\u003ePROJECT_NAMESPACE\u003c/var\u003e: your project namespace.\n\n For example, the Cortex endpoint for the `platform-obs` project in the\n `org-1` organization is `https://org-1/platform-obs/cortex/alertmanager/`.\n | **Note:** You can directly open the URL in a web browser to query alerts. The instructions in the following sections use the `curl` command to call the endpoint, but the same applies to a web browser.\n\n#### Authenticate the `curl` request\n\n1. [Download and install the gdcloud CLI](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-overview).\n2. [Set](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-reference/gdcloud-config-set) the\n gdcloud `core/organization_console_url` property:\n\n gdcloud config set core/organization_console_url\n https://\u003cvar translate=\"no\"\u003eGDC_URL\u003c/var\u003e\n\n3. [Sign in with the configured identity provider](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-auth#sign-in-with-idp):\n\n gdcloud auth login\n\n4. Use your username and password to authenticate and sign in.\n\n When the login is successful, you can use the authorization header in your\n cURL request through the `gdcloud auth print-identity-token` command. For\n more information, see\n [gdcloud auth](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-reference/gdcloud-auth).\n\n#### Call the Cortex endpoint\n\nComplete the following steps to reach the Cortex endpoint using the `curl`\ntool:\n\n1. [Authenticate the `curl` request](#auth-curl-request).\n2. Use `curl` to call the [Cortex endpoint](#id-cortex-endpoint) and\n extend the URL using the standard Alertmanager API specification\n (\u003chttps://prometheus.io/docs/prometheus/latest/querying/api/#alertmanagers\u003e)\n to query alerts.\n\n The following is an example of a `curl` request: \n\n curl https://\u003cvar translate=\"no\"\u003eGDC_URL\u003c/var\u003e/\u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e/cortex/alertmanager/api/v1/alertmanagers \\\n -H \"Authorization: Bearer $(gdcloud auth print-identity-token \\\n --audiences=https://\u003cvar translate=\"no\"\u003eGDC_URL\u003c/var\u003e)\"\n\n You obtain the output following the command. The API response is in JSON\n format.\n | **Note:** Add the `api/v1/alertmanagers` endpoint to query active and eliminated alerts from the URL."]]