This is an automated email from the ASF dual-hosted git repository. gongchao pushed a commit to branch fix-third-alarm in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
commit f67e42f58586a68bf91a399373d4e27e24a029e4 Author: tomsun28 <tomsu...@outlook.com> AuthorDate: Sun Jan 12 16:39:21 2025 +0800 [webapp] add alert integration Signed-off-by: tomsun28 <tomsu...@outlook.com> --- .../doc/alert-integration/alertmanager.en-US.md | 26 ++++++++++++---------- .../doc/alert-integration/alertmanager.zh-CN.md | 26 ++++++++++++---------- .../doc/alert-integration/alertmanager.zh-TW.md | 26 ++++++++++++---------- 3 files changed, 42 insertions(+), 36 deletions(-) diff --git a/web-app/src/assets/doc/alert-integration/alertmanager.en-US.md b/web-app/src/assets/doc/alert-integration/alertmanager.en-US.md index 9b57a6ffcc..cc722fa41c 100644 --- a/web-app/src/assets/doc/alert-integration/alertmanager.en-US.md +++ b/web-app/src/assets/doc/alert-integration/alertmanager.en-US.md @@ -6,19 +6,21 @@ This document describes how to send alerts from Prometheus AlertManager to the H 1. Add the webhook configuration to the Alertmanager configuration file. - ```yaml - receivers: - - name: 'webhook' - webhook_configs: - - url: 'http://${hertzbeat_host}:1157/api/alerts/report/alertmanager' - http_config: - headers: - Authorization: 'Bearer {token}' - send_resolved: true - ``` -- `http://${hertzbeat_ip}:8080/api/alerts/report` is the webhook interface address provided by HertzBeat. +```yaml +receivers: + - name: 'webhook' + webhook_configs: + - url: 'http://${hertzbeat_host}:1157/api/alerts/report/alertmanager' + send_resolved: true + http_config: + authorization: + type: 'Bearer' + credentials: '{token}' +``` + +- `http://${hertzbeat_host}:1157/api/alerts/report/alertmanager` is the webhook interface address provided by HertzBeat. - `send_resolved: true` indicates that alert recovery information will be sent. -- The {token} in `Authorization` is the token provided by HertzBeat. +- The {token} in `credentials` is the token provided by HertzBeat. 2. Restart the Alertmanager service. diff --git a/web-app/src/assets/doc/alert-integration/alertmanager.zh-CN.md b/web-app/src/assets/doc/alert-integration/alertmanager.zh-CN.md index a345e69d4f..58f3311a9d 100644 --- a/web-app/src/assets/doc/alert-integration/alertmanager.zh-CN.md +++ b/web-app/src/assets/doc/alert-integration/alertmanager.zh-CN.md @@ -4,19 +4,21 @@ 1. 在 Alertmanager 配置文件中添加 webhook 配置。 - ```yaml - receivers: - - name: 'webhook' - webhook_configs: - - url: 'http://${hertzbeat_host}:1157/api/alerts/report/alertmanager' - http_config: - headers: - Authorization: 'Bearer {token}' - send_resolved: true - ``` -- `http://${hertzbeat_ip}:8080/api/alerts/report` 为 HertzBeat 提供的 webhook 接口地址。 +```yaml +receivers: + - name: 'webhook' + webhook_configs: + - url: 'http://${hertzbeat_host}:1157/api/alerts/report/alertmanager' + send_resolved: true + http_config: + authorization: + type: 'Bearer' + credentials: '{token}' +``` + +- `http://${hertzbeat_host}:1157/api/alerts/report/alertmanager` 为 HertzBeat 提供的 webhook 接口地址。 - `send_resolved: true` 表示发送告警恢复信息。 -- `Authorization` 内的 {token} 为 HertzBeat 提供的 token。 +- `credentials` 内的 {token} 为 HertzBeat 提供的 token。 2. 重启 Alertmanager 服务。 diff --git a/web-app/src/assets/doc/alert-integration/alertmanager.zh-TW.md b/web-app/src/assets/doc/alert-integration/alertmanager.zh-TW.md index b7606af054..2cb1a9fb7e 100644 --- a/web-app/src/assets/doc/alert-integration/alertmanager.zh-TW.md +++ b/web-app/src/assets/doc/alert-integration/alertmanager.zh-TW.md @@ -4,19 +4,21 @@ 1. 在 Alertmanager 配置文件中添加 webhook 配置。 - ```yaml - receivers: - - name: 'webhook' - webhook_configs: - - url: 'http://${hertzbeat_host}:1157/api/alerts/report/alertmanager' - http_config: - headers: - Authorization: 'Bearer {token}' - send_resolved: true - ``` -- `http://${hertzbeat_ip}:8080/api/alerts/report` 為 HertzBeat 提供的 webhook 接口地址。 +```yaml +receivers: + - name: 'webhook' + webhook_configs: + - url: 'http://${hertzbeat_host}:1157/api/alerts/report/alertmanager' + send_resolved: true + http_config: + authorization: + type: 'Bearer' + credentials: '{token}' +``` + +- `http://${hertzbeat_host}:1157/api/alerts/report/alertmanager` 為 HertzBeat 提供的 webhook 接口地址。 - `send_resolved: true` 表示發送告警恢復信息。 -- `Authorization` 內的 {token} 為 HertzBeat 提供的 token。 +- `credentials` 內的 {token} 為 HertzBeat 提供的 token。 2. 重啟 Alertmanager 服務。 --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org For additional commands, e-mail: notifications-h...@hertzbeat.apache.org