Stay organized with collections
Save and categorize content based on your preferences.
This page provides detailed instructions on how to query and visualize open
alerts using both the GDC console and the curl tool for the Cortex
endpoint to gain issue awareness and resolve problems.
After creating alert rules
based on logs and metrics from Google Distributed Cloud (GDC) air-gapped environments, you
can start monitoring open alerts from your project. You can visualize and filter
alerts that your system events trigger on the GDC console or access
them directly from Cortex using the curl tool for flexible scripting and
automation.
You can access open alerts in one of the following two methods:
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.
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.
Before you begin
To get the permissions that you need to query and visualize alerts, ask your
Project IAM Admin to grant you one of the associated Project Cortex Alertmanager
roles in your project namespace. Depending on the level of access and
permissions you need, you might obtain editor or viewer roles for this resource
in a project.
Use your username and password to authenticate and sign in.
When the login is successful, you can use the authorization header in your
cURL request through the gdcloud auth print-identity-token command. For
more information, see
gdcloud auth.
Call the Cortex endpoint
Complete the following steps to reach the Cortex endpoint using the curl
tool:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 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."]]