菜单
Grafana Cloud Enterprise 开源

配置 Google Chat 用于告警

使用 Grafana 告警 - Google Chat 集成,当 Grafana 告警规则被触发或解决时,在你的 Google Chat 空间接收告警通知。

开始之前

创建一个 Webhook 以使 Grafana 能够将告警通知发送到 Google Chat 空间。要在 Google Chat 空间中创建 Webhook,请完成以下步骤。

  1. 按照 Google 的 Chat 应用指南中的步骤操作。
  2. 复制 Webhook URL。

步骤

要在 Grafana 告警中创建 Google Chat 集成,请完成以下步骤。

  1. 导航到 **Alerts & IRM** -> **Alerting** -> **Contact points**。

  2. 点击 **+ Add contact point**。

  3. 输入联系点名称。

  4. 从集成列表中,选择 **Google Chat**。

  5. 在 **URL** 字段中,粘贴你的 Webhook URL。

  6. 点击 **Test** 检查你的集成是否有效。

    ** 仅适用于 Grafana Alertmanager。**

    测试告警通知应已发送到你关联了 Webhook 的 Google Chat 空间。

  7. 点击 **Save contact point**。

后续步骤

Google Chat 联系点已准备好接收告警通知。

要将此联系点添加到你的告警中,请完成以下步骤。

  1. 在 Grafana 中,导航到 **Alerting** > **Alert rules**。
  2. 编辑或创建新的告警规则。
  3. 向下滚动到 **Configure labels and notifications** 部分。
  4. 在 **Notifications** 下,点击 **Select contact point**。
  5. 从下拉菜单中,选择之前创建的联系点。
  6. 点击 **Save rule and exit**。