Skip to content

Commit 4d12156

Browse files
committed
add harbor docs
1 parent c4beafa commit 4d12156

3 files changed

Lines changed: 111 additions & 2 deletions

File tree

docs.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@
186186
"zh/on-call/integration/alert-integration/alert-sources/zstack",
187187
"zh/on-call/integration/alert-integration/alert-sources/cloudflare",
188188
"zh/on-call/integration/alert-integration/alert-sources/meraki",
189-
"zh/on-call/integration/alert-integration/alert-sources/monit"
189+
"zh/on-call/integration/alert-integration/alert-sources/monit",
190+
"zh/on-call/integration/alert-integration/alert-sources/harbor"
190191
]
191192
},
192193
{
@@ -558,7 +559,8 @@
558559
"en/on-call/integration/alert-integration/alert-sources/zstack",
559560
"en/on-call/integration/alert-integration/alert-sources/cloudflare",
560561
"en/on-call/integration/alert-integration/alert-sources/meraki",
561-
"en/on-call/integration/alert-integration/alert-sources/monit"
562+
"en/on-call/integration/alert-integration/alert-sources/monit",
563+
"en/on-call/integration/alert-integration/alert-sources/harbor"
562564
]
563565
},
564566
{
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: "Harbor Alert Integration"
3+
description: "Sync Harbor alert events to Flashduty via webhook for automated alert noise reduction"
4+
keywords: ["Harbor", "alert integration", "webhook", "container registry"]
5+
---
6+
7+
Sync Harbor alert events to Flashduty via webhook for automated alert noise reduction.
8+
9+
## In Flashduty
10+
11+
### Create Harbor Alert Integration
12+
13+
You can obtain an integration push URL through either of these two methods:
14+
15+
#### Using Private Integration
16+
17+
Choose this method when you don't need to route alert events to different channels - it's simpler.
18+
19+
<Accordion title="Expand">
20+
1. Go to the Flashduty console, select **Channel**, and enter a channel's details page
21+
2. Select the **Integrations** tab, click **Add Integration** to enter the integration page
22+
3. Choose **Harbor** integration and click **Save** to generate a card
23+
4. Click the generated card to view the **Push URL**, copy it for later use, and you're done
24+
</Accordion>
25+
26+
#### Using Shared Integration
27+
28+
Choose this method when you need to route alerts to different channels based on the alert event payload.
29+
30+
<Accordion title="Expand">
31+
1. Go to the Flashduty console, select **Integration Center=>Alert Events** to enter the integration selection page
32+
2. Select **Harbor** integration:
33+
- **Integration Name**: Define a name for this integration
34+
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)
35+
4. Click **Save** and copy the newly generated **push URL** for later use
36+
5. Done
37+
</Accordion>
38+
39+
## In Harbor
40+
41+
### Configure Webhooks
42+
43+
1. Log in to the Harbor interface with an account that has at least project administrator privileges.
44+
2. Go to `Projects`, select a project, and select `Webhooks`.
45+
3. Select notify type `HTTP`, so the webhook will be send to a HTTP endpoint.
46+
4. Select payload format as `Default or CloudEvents` when choose the HTTP notify type.
47+
5. Select events that you want to subscribe.
48+
6. Enter the alert integration's push URL in the Endpoint URL field.
49+
7. Click Add to create the webhook.
50+
51+
## Severity Mapping
52+
53+
Currently, all alerts pushed to Flashduty through the Harbor integration are set to Warning severity. However, you can customize the severity using the [alert pipeline](/en/on-call/integration/alert-integration/alert-pipelines).
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "Harbor 告警集成"
3+
description: "通过 webhook 的方式同步 Harbor 的告警事件到 Flashduty,实现告警事件自动化降噪处理"
4+
keywords: ["Harbor", "告警集成", "webhook", "容器镜像"]
5+
---
6+
7+
通过 webhook 的方式同步 Harbor 的告警事件到 Flashduty,实现告警事件自动化降噪处理。
8+
9+
## 在 Flashduty
10+
11+
### 创建 Harbor 告警集成
12+
13+
您可通过以下2种方式,获取一个 Harbor 告警集成地址,任选其一即可。
14+
15+
#### 使用专属集成
16+
17+
当您不需要将告警事件路由到不同的协作空间,优先选择此方式,更简单。
18+
19+
<Accordion title="展开">
20+
1. 进入 Flashduty 控制台,选择 **协作空间**,进入某个空间的详情页面
21+
2. 选择 **集成数据** tab,点击 **添加一个集成**,进入添加集成页面
22+
3. 选择 **Harbor** 集成,点击 **保存**,生成卡片。
23+
4. 点击生成的卡片,可以查看到 **Harbor 告警集成地址**,复制备用,完成。
24+
</Accordion>
25+
26+
#### 使用共享集成
27+
28+
当您需要根据告警事件的 Payload 信息,将告警路由到不同的协作空间,优先选择此方式。
29+
30+
<Accordion title="展开">
31+
1. 进入 Flashduty 控制台,选择 **集成中心=>告警事件**,进入集成选择页面。
32+
2. 选择 **Harbor** 集成:
33+
- **集成名称**:为当前集成定义一个名称。
34+
- **推送模式**:选择告警在何种情况下触发或恢复告警。
35+
3. 复制当前页面的 **Harbor 告警集成地址** 备用。
36+
4. 配置默认路由,并选择对应的协作空间(集成创建后可以前往 `路由` 进行更多路由规则的配置)。
37+
5. 完成。
38+
</Accordion>
39+
40+
## 在 Harbor
41+
42+
### 配置 Webhook 通道
43+
44+
1. 使用至少具有项目管理员权限的帐户登录 Harbor 界面。
45+
2. 转到`项目`,选择一个项目,然后选择 `Webhook`
46+
3. 选择通知类型 `HTTP`,以便 webhook 将发送到 HTTP 端点。
47+
4. 当选择 HTTP 通知类型时,选择有效负载格式为 `Default 或 CloudEvents`
48+
5. 选择您要`订阅的事件`
49+
6. `Endpoint URL` 输入告警集成的推送地址。
50+
7. 单击 添加 以创建 webhook。
51+
52+
## 严重程度映射关系
53+
54+
当前 Harbor 告警集成推送到 Flashduty 的严重程度均为 Warning,但您可以通过[告警处理 Pipeline](/zh/on-call/integration/alert-integration/alert-pipelines) 来自定义严重程度。

0 commit comments

Comments
 (0)