Benachrichtigungskanäle für Benachrichtigungen konfigurieren
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Auf der Observability-Plattform können Sie Benachrichtigungskanäle für die von Ihnen eingerichteten Benachrichtigungen konfigurieren. Das System sendet eine Benachrichtigung an diese benutzerdefinierten Kanäle, wenn ein Ereignis eine Benachrichtigung auslöst. So können Sie die gewünschten Empfänger über die von Ihnen bevorzugten Methoden benachrichtigen.
Für die Air-Gap-Appliance von Google Distributed Cloud (GDC) sind keine Benachrichtigungskanäle
zum Senden von Benachrichtigungen vordefiniert. Sie müssen mindestens einen Kanal definieren, über den Sie Benachrichtigungen erhalten. Wenn Sie keine Konfiguration für den Benachrichtigungskanal definieren, verwendet das GDC Observability-System standardmäßig die Konfiguration aus den Plattformressourcen. Wenn Sie also keinekonfigurieren, ein Administrator dies aber für die Organisation tut, sendet das System Benachrichtigungen an diese Kanäle.
Hinweise
Bitten Sie Ihren Projekt-IAM-Administrator, Ihnen eine der folgenden Rollen in Ihrem Projekt-Namespace zuzuweisen, um die Berechtigungen zu erhalten, die Sie zum Konfigurieren oder Aufrufen von Benachrichtigungschannels benötigen:
Observability Pipeline Editor: Bearbeitet oder ändert benutzerdefinierte ObservabilityPipeline-Ressourcen. Fordern Sie die Rolle „Observability Pipeline Editor“ (observabilitypipeline-editor) an.
Observability Pipeline Viewer: Zeigt benutzerdefinierte ObservabilityPipeline-Ressourcen an. Fordern Sie die Rolle „Observability Pipeline Viewer“ (observabilitypipeline-viewer) an.
Benachrichtigungskanäle konfigurieren
Führen Sie die folgenden Schritte aus, um Benachrichtigungskanäle für die Warnungen zu konfigurieren, die Sie für die Systemüberwachung eingerichtet haben:
Erstellen Sie ein ConfigMap-Objekt und stellen Sie es im Namespace Ihres Projekts bereit. Das Objekt muss die Konfigurationsregeln in der Datei alertmanager.yml enthalten.
apiVersion:v1kind:ConfigMapmetadata:# The name must match the ConfigMap name specified in the ObservabilityPipeline custom resource.name:CUSTOMIZED_CONFIGMAP_NAME# Choose namespace that matches the project's namespacenamespace:PROJECT_NAMESPACEdata:# The file name must be alertmanager.yml.alertmanager.yml:|# Add the customized Alertmanager configuration here.
Ersetzen Sie Folgendes:
CUSTOMIZED_CONFIGMAP_NAME: Der Name Ihrer Konfigurationsdatei, die im nächsten Schritt in der ObservabilityPipeline-Antwortvorlage verwendet werden soll.
PROJECT_NAMESPACE: Der Namespace Ihres Projekts.
Konfigurieren Sie die benutzerdefinierte Ressource ObservabilityPipeline in einem Befehlszeileneditor, um die Konfiguration im Feld alertmanagerConfig zu importieren, das im Feld alerting verschachtelt ist.
# Configure observability pipelineapiVersion:observability.gdc.goog/v1kind:ObservabilityPipelinemetadata:# Choose namespace that matches the project's namespacenamespace:PROJECT_NAMESPACEname:observability-configspec:# Configure Alertmanageralerting:# Permission: PA and AO# The alerts configuration must be in the key "alertmanager.yml" of the configMapalertmanagerConfig:CUSTOMIZED_CONFIGMAP_NAME...
Ersetzen Sie Folgendes:
PROJECT_NAMESPACE: Der Namespace Ihres Projekts.
CUSTOMIZED_CONFIGMAP_NAME: Der Name, den Sie für Ihre Konfigurationsdatei im ConfigMap-Objekt verwendet haben. Der Name muss genau übereinstimmen.
Speichern Sie die Änderungen in der benutzerdefinierten Ressource ObservabilityPipeline und beenden Sie den Befehlszeileneditor.
[[["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\u003eThe Observability platform allows users to configure custom notification channels for alerts, ensuring that notifications are sent to the desired recipients through their preferred methods.\u003c/p\u003e\n"],["\u003cp\u003eGDC air-gapped appliance requires users to define at least one notification channel to receive alerts, as it does not have predefined channels; if no channels are defined, it uses organization-level configurations.\u003c/p\u003e\n"],["\u003cp\u003eTo configure or view notification channels, users need specific permissions, either the Observability Pipeline Editor role for modifying configurations or the Observability Pipeline Viewer role for viewing configurations.\u003c/p\u003e\n"],["\u003cp\u003eConfiguring notification channels involves defining the configuration in an \u003ccode\u003ealertmanager.yml\u003c/code\u003e file, creating a \u003ccode\u003eConfigMap\u003c/code\u003e object with this file, and then updating the \u003ccode\u003eObservabilityPipeline\u003c/code\u003e custom resource to point to this \u003ccode\u003eConfigMap\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Configure notification channels for alerts\n\nThe Observability platform lets you configure notification channels for the alerts you set up. The system sends an alert to these customized channels whenever an event causes an alert. This way, you can notify the recipients you need according to your preferred methods.\n\nGoogle Distributed Cloud (GDC) air-gapped appliance does not predefine notification channels\n\nintended for sending alerts. You must define at least one channel to receive alerts. If you don't define a notification channel configuration, the GDC Observability system takes the configuration from the platform resources as a default. Consequently, if you don't configure\n\nnotification channels but an administrator did it for the organization, then the system sends alerts to those channels.\n\nBefore you begin\n----------------\n\nTo get the permissions you need to configure or view notification channels, ask your Project IAM Admin to grant you one of the following roles in your project namespace:\n\n- **Observability Pipeline Editor** : edits or modifies `ObservabilityPipeline` custom resources. Request the Observability Pipeline Editor (`observabilitypipeline-editor`) role.\n- **Observability Pipeline Viewer** : views `ObservabilityPipeline` custom resources. Request the Observability Pipeline Viewer (`observabilitypipeline-viewer`) role.\n\nConfigure notification channels\n-------------------------------\n\nWork through the following steps to configure notification channels for the alerts you set up for system monitoring:\n\n1. Define the Observability alerting configuration following the specification in \u003chttps://prometheus.io/docs/alerting/latest/configuration/\u003e.\n2. Create a `ConfigMap` object and deploy it into your project namespace. The object must contain the configuration rules in the `alertmanager.yml` file.\n\n apiVersion: v1\n kind: ConfigMap\n metadata:\n # The name must match the ConfigMap name specified in the ObservabilityPipeline custom resource.\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eCUSTOMIZED_CONFIGMAP_NAME\u003c/span\u003e\u003c/var\u003e\n # Choose namespace that matches the project's namespace\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003ePROJECT_NAMESPACE\u003c/span\u003e\u003c/var\u003e\n data:\n # The file name must be alertmanager.yml.\n alertmanager.yml: |\n # Add the customized Alertmanager configuration here.\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eCUSTOMIZED_CONFIGMAP_NAME\u003c/var\u003e: The name of your configuration file to use it in the `ObservabilityPipeline` CR during the following step.\n - \u003cvar translate=\"no\"\u003ePROJECT_NAMESPACE\u003c/var\u003e: The namespace of your project.\n\n | **Note:** Follow the same syntax as described in \u003chttps://prometheus.io/docs/alerting/latest/configuration\u003e to define the notification channels in the `alertmanager.yml` file.\n3. Configure the `ObservabilityPipeline` custom resource in a command-line editor to import the configuration in the `alertmanagerConfig` field nested in the `alerting` field.\n\n # Configure observability pipeline\n apiVersion: observability.gdc.goog/v1\n kind: ObservabilityPipeline\n metadata:\n # Choose namespace that matches the project's namespace\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003ePROJECT_NAMESPACE\u003c/span\u003e\u003c/var\u003e\n name: observability-config\n spec:\n # Configure Alertmanager\n alerting:\n # Permission: PA and AO\n # The alerts configuration must be in the key \"alertmanager.yml\" of the configMap\n alertmanagerConfig: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eCUSTOMIZED_CONFIGMAP_NAME\u003c/span\u003e\u003c/var\u003e\n ...\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_NAMESPACE\u003c/var\u003e: The namespace of your project.\n - \u003cvar translate=\"no\"\u003eCUSTOMIZED_CONFIGMAP_NAME\u003c/var\u003e: The name you used for your configuration file in the `ConfigMap` object. The name must match exactly.\n4. Save the changes in the `ObservabilityPipeline` CR and exit your command-line editor."]]