Skip to content

Commit 64446b2

Browse files
authored
Merge pull request #115 from flashcatcloud/f-aliyun-prometheus
F aliyun prometheus
2 parents e9878fe + 43ad911 commit 64446b2

5 files changed

Lines changed: 273 additions & 4 deletions

File tree

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: "Alibaba Cloud Monitor Prometheus"
3+
description: "Sync Alibaba Cloud Monitor Prometheus alert events to Flashduty via webhook for automated alert noise reduction"
4+
date: "2025-05-19T10:00:00+08:00"
5+
url: "https://docs.flashcat.cloud/en/flashduty/aliyun-prometheus-integration-guide"
6+
---
7+
8+
Sync Alibaba Cloud Monitor Prometheus alert events to Flashduty via webhook for automated alert noise reduction.
9+
10+
<div class="hide">
11+
12+
## In Flashduty
13+
---
14+
You can obtain an integration push URL through either of these two methods:
15+
16+
### Using Private Integration
17+
18+
Choose this method when you don't need to route alert events to different channels - it's simpler.
19+
20+
<details>
21+
<summary>Expand</summary>
22+
23+
1. Go to the Flashduty console, select **Channel**, and enter a channel's details page
24+
2. Select the **Integrations** tab, click **Add Integration** to enter the integration page
25+
3. Choose **Alibaba Cloud Monitor Prometheus** integration and click **Save** to generate a card
26+
4. Click the generated card to view the **Push URL**, copy it for later use, and you're done
27+
28+
</details>
29+
30+
### Using Shared Integration
31+
32+
Choose this method when you need to route alerts to different channels based on the alert event payload.
33+
34+
<details>
35+
<summary>Expand</summary>
36+
37+
1. Go to the Flashduty console, select **Integration Center=>Alert Events** to enter the integration selection page
38+
2. Select **Alibaba Cloud Monitor Prometheus** integration:
39+
- **Integration Name**: Define a name for this integration
40+
3. Configure the default route and select the corresponding channel (after the integration is created, you can go to `Route` to configure more routing rules)
41+
4. Click **Save** and copy the newly generated **push URL** for later use
42+
5. Done
43+
44+
</details>
45+
46+
</div>
47+
48+
## In Alibaba Cloud
49+
---
50+
51+
### Step 1: Create a Custom Webhook
52+
1. Login to your Alibaba Cloud console, search for `Cloud Monitor` product, and enter the corresponding product console.
53+
2. In the left menu, select `Prometheus Monitoring->Notification Objects`, and create or edit a `Custom Webhook`.
54+
3. On the edit page, enter `Flashduty` for both the name and identifier, and enter the <span class='integration_url'>push URL</span> for the alert integration in the `URL` field.
55+
4. In the `Headers` section, set **Header Key** to **Content-Type** and **Header Value** to **application/json**.
56+
5. Select **POST** for `Method` and **JSON** for `Data Format`.
57+
6. Click `OK` to complete the configuration.
58+
59+
### Step 2: Configure Alert Rules
60+
1. Login to your Alibaba Cloud console, search for `Cloud Monitor` product, and enter the corresponding product console.
61+
2. In the left menu, select `Prometheus Monitoring->Alert Rules`, and create or edit an alert rule.
62+
3. In the **Notification Mode** section of the rule configuration page, select `Simple Mode`.
63+
4. For `Notification Object`, select the custom webhook created in **Step 1**.
64+
5. Click `OK` to complete the configuration.
65+
66+
## Severity Mapping
67+
---
68+
<div class="md-block">
69+
70+
Alibaba Cloud Prometheus to Flashduty severity mapping:
71+
72+
| Alibaba Cloud Monitor | Flashduty | Status |
73+
| --------------------- | --------- | -------- |
74+
| Critical | Critical | Critical |
75+
| Error | Critical | Critical |
76+
| Warning | Warning | Warning |
77+
| Normal | Info | Info |
78+
79+
</div>
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
title: "京东云监控告警集成"
3+
description: "通过 webhook 的方式同步京东云监控告警事件到 Flashduty,实现告警事件自动化降噪处理"
4+
date: "2025-05-19T10:00:00+08:00"
5+
url: "https://docs.flashcat.cloud/zh/flashduty/aliyun-prometheus-integration-guide"
6+
---
7+
8+
通过 webhook 的方式同步京东云监控告警事件到 Flashduty,实现告警事件自动化降噪处理。
9+
10+
<div class="hide">
11+
12+
## 在 Flashduty
13+
---
14+
您可通过以下2种方式,获取一个集成推送地址,任选其一即可。
15+
16+
### 使用专属集成
17+
18+
当您不需要将告警事件路由到不同的协作空间,优先选择此方式,更简单。
19+
20+
<details>
21+
<summary>展开</summary>
22+
23+
1. 进入 Flashduty 控制台,选择 **协作空间**,进入某个空间的详情页面
24+
2. 选择 **集成数据** tab,点击 **添加一个集成**,进入添加集成页面
25+
3. 选择 **京东云监控** 集成,点击 **保存**,生成卡片。
26+
4. 点击生成的卡片,可以查看到 **推送地址**,复制备用,完成。
27+
28+
29+
</details>
30+
31+
### 使用共享集成
32+
33+
当您需要根据告警事件的 Payload 信息,将告警路由到不同的协作空间,优先选择此方式。
34+
35+
<details>
36+
<summary>展开</summary>
37+
38+
1. 进入 Flashduty 控制台,选择 **集成中心=>告警事件**,进入集成选择页面。
39+
2. 选择 **京东云监控** 集成:
40+
- **集成名称**:为当前集成定义一个名称。
41+
3. 配置默认路由,并选择对应的协作空间(集成创建后可以前往 `路由` 进行更多路由规则的配置)。
42+
4. 点击 **保存** 后,复制当前页面的新生成的 **推送地址** 备用。
43+
5. 完成。
44+
45+
</details>
46+
47+
</div>
48+
49+
## 在京东云
50+
---
51+
52+
一、在京东云监控配置告警推送
53+
54+
### 步骤 1:创建通知模版
55+
1. 登录您的京东云控制台,检索 `云监控` 产品,并进入对应产品控制台。
56+
2. 在左侧菜单中选择 `告警管理->通知模版`,选择创建或编辑通知模版。
57+
3. 在页面中勾选 `告警回调``URL`中输入告警集成的<span class='integration_url'>推送地址</span>。
58+
4. `POST` 编辑框中输入以下模版内容。
59+
```
60+
{
61+
"resource_id": "${resourceId}",
62+
"request_id": "${requestId}",
63+
"metric": "${metric}",
64+
"current_value": "${currentValue}",
65+
"times": "${times}",
66+
"tags": "${tags}",
67+
"alert_time": "${alertTime}",
68+
"region": "${region}",
69+
"threshold": "${threshold}",
70+
"service_code": "${serviceCode}",
71+
"as_group_id": "${asGroupId}",
72+
"unhealthy_instance": "${unhealthyInstance}",
73+
"rule_policy_id": "${rulePolicyId}",
74+
"service_code_en": "${serviceCodeEN}",
75+
"service_code_cn": "${serviceCodeCN}",
76+
"level": "${level}",
77+
"resource_name": "${resourceName}",
78+
"ip_address": "${ipAddress}",
79+
"status": "${status}"
80+
}
81+
82+
```
83+
5. 其他选项按需配置。
84+
6. 点击 `保存` 完成配置。
85+
86+
### 步骤 2:配置告警规则
87+
1. 登录您的京东云控制台,检索 `云监控` 产品,并进入对应产品控制台。
88+
2. 在左侧菜单中选择 `告警管理->全部告警规则`,选择创建或编辑告警规则。
89+
3. 在规则编辑页面中的 `通知策略` 处选择 `使用模版` 且模版选择**步骤1**创建的模版。
90+
4. 其他选项按需配置。
91+
5. 点击 `保存` 完成配置。
92+
93+
## 二、状态对照
94+
---
95+
<div class="md-block">
96+
97+
京东云监控 到 Flashduty 告警等级映射关系:
98+
99+
| 京东云监控 | Flashduty | 状态 |
100+
| --------------- | --------- | ---- |
101+
| 紧急 | Critical | 紧急 |
102+
| 严重 | Warning | 警告 |
103+
| 一般 | Info | 提醒 |
104+
105+
</div>
106+
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: "阿里云监控 Prometheus"
3+
description: "通过 webhook 的方式同步阿里云监控 Prometheus 告警事件到 Flashduty,实现告警事件自动化降噪处理"
4+
date: "2025-05-19T10:00:00+08:00"
5+
url: "https://docs.flashcat.cloud/zh/flashduty/jdcloud-integration-guide"
6+
---
7+
8+
通过 webhook 的方式同步阿里云监控 Prometheus 告警事件到 Flashduty,实现告警事件自动化降噪处理。
9+
10+
<div class="hide">
11+
12+
## 在 Flashduty
13+
---
14+
您可通过以下2种方式,获取一个集成推送地址,任选其一即可。
15+
16+
### 使用专属集成
17+
18+
当您不需要将告警事件路由到不同的协作空间,优先选择此方式,更简单。
19+
20+
<details>
21+
<summary>展开</summary>
22+
23+
1. 进入 Flashduty 控制台,选择 **协作空间**,进入某个空间的详情页面
24+
2. 选择 **集成数据** tab,点击 **添加一个集成**,进入添加集成页面
25+
3. 选择 **阿里云监控 Prometheus** 集成,点击 **保存**,生成卡片。
26+
4. 点击生成的卡片,可以查看到 **推送地址**,复制备用,完成。
27+
28+
29+
</details>
30+
31+
### 使用共享集成
32+
33+
当您需要根据告警事件的 Payload 信息,将告警路由到不同的协作空间,优先选择此方式。
34+
35+
<details>
36+
<summary>展开</summary>
37+
38+
1. 进入 Flashduty 控制台,选择 **集成中心=>告警事件**,进入集成选择页面。
39+
2. 选择 **阿里云监控 Prometheus** 集成:
40+
- **集成名称**:为当前集成定义一个名称。
41+
3. 配置默认路由,并选择对应的协作空间(集成创建后可以前往 `路由` 进行更多路由规则的配置)。
42+
4. 点击 **保存** 后,复制当前页面的新生成的 **推送地址** 备用。
43+
5. 完成。
44+
45+
</details>
46+
47+
</div>
48+
49+
## 在阿里云
50+
---
51+
52+
一、在阿里云监控配置告警推送
53+
54+
### 步骤 1:创建自定义 Webhook
55+
1. 登录您的阿里云控制台,检索 `云监控` 产品,并进入对应产品控制台。
56+
2. 在左侧菜单中选择 `Prometheus 监控->通知对象`,选择创建或编辑`自定义 Webhook`
57+
3. 在编辑页面中,名称和标识符填写 `Flashduty``URL`中输入告警集成的<span class='integration_url'>推送地址</span>。
58+
4. `Headers` 中的 **Header Key** 填写 **Content-Type****Header Value** 填写 **application/json**
59+
5. `Method` 选择 **POST**`数据格式` 选择 **JSON**
60+
6. 点击 `确定` 完成配置。
61+
62+
### 步骤 2:配置报警规则
63+
1. 登录您的阿里云控制台,检索 `云监控` 产品,并进入对应产品控制台。
64+
2. 在左侧菜单中选择 `Prometheus 监控->报警规则`,选择创建或编辑告警规则。
65+
3. 在规则编辑页面中的 `通知模式` 处选择 `极简模式`
66+
4. `通知对象` 选择**步骤1**创建的自定义 Webhook。
67+
5. 点击 `确定` 完成配置。
68+
69+
## 二、状态对照
70+
---
71+
<div class="md-block">
72+
73+
阿里云 Prometheus 监控到 Flashduty 告警等级映射关系:
74+
75+
| 阿里云监控 | Flashduty | 状态 |
76+
| --------------- | --------- | ---- |
77+
| 紧急 | Critical | 紧急 |
78+
| 错误 | Critical | 紧急 |
79+
| 警告 | Warning | 警告 |
80+
| 普通 | Info | 提醒 |
81+
82+
</div>

src/en.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ import VolcEngineRTC from "../flashduty/en/1. On-call/8. Integrations/8.1 Alerts
5757
import UcloudCloudWatch from "../flashduty/en/1. On-call/8. Integrations/8.1 Alerts integration/8.1.56 Ucloud CloudWatch Integration.md?raw";
5858
import Nagios from "../flashduty/en/1. On-call/8. Integrations/8.1 Alerts integration/8.1.57 Nagios Integration.md?raw";
5959
import JDCloudMonitor from "../flashduty/en/1. On-call/8. Integrations/8.1 Alerts integration/8.1.58 JD Cloud Monitoring Integration.md?raw";
60+
import AliyunPrometheus from "../flashduty/en/1. On-call/8. Integrations/8.1 Alerts integration/8.1.59 Alibaba Cloud Prometheus Integration.md?raw";
6061
/** ⬆️⬆️⬆️⬆️ 告警集成 ⬆️⬆️⬆️⬆️ */
61-
6262
/** ⬇️⬇️⬇️⬇️ 变更事件 ⬇️⬇️⬇️⬇️ */
6363
import CustomChange from "../flashduty/en/1. On-call/8. Integrations/8.2 Change integration/8.2.1 Standard Change Event.md?raw";
6464
import Jira from "../flashduty/en/1. On-call/8. Integrations/8.2 Change integration/8.2.2 Jira Issue Events.md?raw";
@@ -168,6 +168,7 @@ const docs = {
168168
VolcEngineRTC,
169169
UcloudCloudWatch,
170170
Nagios,
171-
JDCloudMonitor
171+
JDCloudMonitor,
172+
AliyunPrometheus
172173
};
173174
export default docs;

src/zh.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ import VolcEngineRTC from "../flashduty/zh/1. On-call/5. 集成引导/8.1 告警
5757
import UcloudCloudWatch from "../flashduty/zh/1. On-call/5. 集成引导/8.1 告警集成/8.1.56 Ucloud CloudWatch 告警集成指引.md?raw";
5858
import Nagios from "../flashduty/zh/1. On-call/5. 集成引导/8.1 告警集成/8.1.57 Nagios 告警集成指引.md?raw";
5959
import JDCloudMonitor from "../flashduty/zh/1. On-call/5. 集成引导/8.1 告警集成/8.1.58 京东云监控告警集成指引.md?raw";
60+
import AliyunPrometheus from "../flashduty/zh/1. On-call/5. 集成引导/8.1 告警集成/8.1 告警集成/8.1.59 阿里云 Prometheus 监控告警集成指引.md?raw";
6061
/** ⬆️⬆️⬆️⬆️ 告警集成 ⬆️⬆️⬆️⬆️ */
61-
6262
/** ⬇️⬇️⬇️⬇️ 变更事件 ⬇️⬇️⬇️⬇️ */
6363
import CustomChange from "../flashduty/zh/1. On-call/5. 集成引导/8.2 变更集成/8.2.1 自定义事件集成指引.md?raw";
6464
import Jira from "../flashduty/zh/1. On-call/5. 集成引导/8.2 变更集成/8.2.2 Jira 事件集成指引.md?raw";
@@ -166,6 +166,7 @@ const docs = {
166166
VolcEngineRTC,
167167
UcloudCloudWatch,
168168
Nagios,
169-
JDCloudMonitor
169+
JDCloudMonitor,
170+
AliyunPrometheus
170171
};
171172
export default docs;

0 commit comments

Comments
 (0)