Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Auf dieser Seite finden Sie eine detaillierte Anleitung zum Abfragen und Visualisieren offener Benachrichtigungen mit der GDC-Konsole und dem curl-Tool für den Cortex-Endpunkt, um Probleme zu erkennen und zu beheben.
Nachdem Sie Benachrichtigungsregeln basierend auf Logs und Messwerten aus Google Distributed Cloud-Umgebungen (GDC) ohne Internetverbindung erstellt haben, können Sie mit der Überwachung offener Benachrichtigungen aus Ihrem Projekt beginnen. Sie können Warnungen, die durch Ihre Systemereignisse ausgelöst werden, in der GDC-Konsole visualisieren und filtern oder direkt über Cortex mit dem curl-Tool für flexibles Scripting und die Automatisierung darauf zugreifen.
Sie haben zwei Möglichkeiten, auf offene Benachrichtigungen zuzugreifen:
GDC-Konsole: Visualisieren Sie Benachrichtigungsdaten in integrierten Bereichen mit Informationen wie der Anzahl der Benachrichtigungen für eine bestimmte Datenquelle, dem Schweregrad, der Dauer, dem Status, der Nachricht und den Labels. Die GDC-Konsole bietet eine benutzerfreundliche Oberfläche zum Filtern und Analysieren von Benachrichtigungen von Ihren Systemkomponenten.
Cortex Alertmanager-Endpunkt: Für komplexere Anwendungsfälle können Sie die Cortex-Instanz Ihres Projekts direkt über das curl-Tool in der Befehlszeile abfragen.
Cortex speichert die Alertmanager-Benachrichtigungen Ihres Projekts und bietet einen HTTP-Endpunkt für den programmatischen Zugriff. Mit diesem Zugriff können Sie Daten exportieren, Aufgaben automatisieren, Cron-Jobs konfigurieren und benutzerdefinierte Integrationen erstellen.
Hinweise
Bitten Sie Ihren Projekt-IAM-Administrator, Ihnen eine der zugehörigen Project Cortex Alertmanager-Rollen in Ihrem Projekt-Namespace zuzuweisen, um die Berechtigungen zu erhalten, die Sie zum Abfragen und Visualisieren von Benachrichtigungen benötigen. Je nach erforderlicher Zugriffsebene und den erforderlichen Berechtigungen können Sie für diese Ressource in einem Projekt Editor- oder Betrachterrollen erhalten.
Wählen Sie im Navigationsmenü Vorgänge>Benachrichtigungen aus.
Wählen Sie den Tab Benachrichtigungen aus.
Rufen Sie die Liste der Benachrichtigungen auf.
Klicken Sie im Abschnitt Geöffnete Benachrichtigungen auf Filtern, um nur offene Benachrichtigungen aufzurufen. Sie können Benachrichtigungen auch nach anderen Property-Namen oder ‑Werten filtern.
Klicken Sie auf den Namen einer Benachrichtigung, um die Benachrichtigungsdetails aufzurufen.
Cortex-Endpunkt
In diesem Abschnitt wird beschrieben, wie Sie über Ihren Cortex Alertmanager-Endpunkt auf Benachrichtigungen zugreifen.
Cortex-Endpunkt ermitteln
Die folgende URL ist der Endpunkt der Cortex-Instanz Ihres Projekts:
Verwenden Sie Ihren Nutzernamen und Ihr Passwort, um sich zu authentifizieren und anzumelden.
Wenn die Anmeldung erfolgreich ist, können Sie den Autorisierungsheader in Ihrer cURL-Anfrage über den Befehl gdcloud auth print-identity-token verwenden. Weitere Informationen finden Sie unter gdcloud auth.
Cortex-Endpunkt aufrufen
Führen Sie die folgenden Schritte aus, um den Cortex-Endpunkt mit dem Tool curl zu erreichen:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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."]]