配置 Google Chat 用于告警
使用 Grafana 告警 - Google Chat 集成,当 Grafana 告警规则被触发或解决时,在你的 Google Chat 空间接收告警通知。
开始之前
创建一个 Webhook 以使 Grafana 能够将告警通知发送到 Google Chat 空间。要在 Google Chat 空间中创建 Webhook,请完成以下步骤。
- 按照 Google 的 Chat 应用指南中的步骤操作。
- 复制 Webhook URL。
步骤
要在 Grafana 告警中创建 Google Chat 集成,请完成以下步骤。
导航到 **Alerts & IRM** -> **Alerting** -> **Contact points**。
点击 **+ Add contact point**。
输入联系点名称。
从集成列表中,选择 **Google Chat**。
在 **URL** 字段中,粘贴你的 Webhook URL。
点击 **Test** 检查你的集成是否有效。
** 仅适用于 Grafana Alertmanager。**
测试告警通知应已发送到你关联了 Webhook 的 Google Chat 空间。
点击 **Save contact point**。
后续步骤
Google Chat 联系点已准备好接收告警通知。
要将此联系点添加到你的告警中,请完成以下步骤。
- 在 Grafana 中,导航到 **Alerting** > **Alert rules**。
- 编辑或创建新的告警规则。
- 向下滚动到 **Configure labels and notifications** 部分。
- 在 **Notifications** 下,点击 **Select contact point**。
- 从下拉菜单中,选择之前创建的联系点。
- 点击 **Save rule and exit**。