Skip to content

Commit

Permalink
update site at 20240318-221756, machine LiaoSirui-MacMini.local
Browse files Browse the repository at this point in the history
  • Loading branch information
LiaoSirui committed Mar 18, 2024
1 parent 77b1999 commit abaaf95
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ AlertManager 主要用于接收 Prometheus 发送的告警信息
- <https://www.cnblogs.com/hmtk123/p/14991088.html>

- <https://help.aliyun.com/document_detail/176180.html>

- <https://flashcat.cloud/docs/content/flashcat-monitor/prometheus/alert/manager-inhibit/>
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
## 告警的标签

prometheus 发给 alertmanager 的每一条告警信息都是带有标签的,而且 alertmanager 是通过标签来标识每一条告警信息。比如说,下面是 alertmanager 接收到的一系列告警信息

```json
{alertname="NodeCPU",instance="peng01",job="node-exporter",serverity="high",...} time, annotation
{alertname="NodeMemory",instance="peng01",job="node-exporter",serverity="high",...} time, annotation
{alertname="NodeCPU",instance="peng02",job="node-exporter",serverity="high",...} time, annotation
{alertname="NodeMemory",instance="peng02",job="node-exporter",serverity="high",...} time, annotation
...
```

## 路由

假设 Prometheus 同时监控了两个组件:数据库组件与缓存组件;我们希望:数据库组件的告警能够发送给数据库小组的相关人员,缓存组件的告警能发送给缓存小组的相关人员
假设 Prometheus 同时监控了两个组件:数据库组件与缓存组件;我们希望:数据库组件的告警能够发送给数据库小组的相关人员,缓存组件的告警能发送给缓存小组的相关人员

基于告警信息的标签与 alertmanager 的路由机制,我们可以达到上面的效果。
基于告警信息的标签与 alertmanager 的路由机制,可以达到上面的效果

比如,我们定义如下的路由树:

Expand Down

0 comments on commit abaaf95

Please sign in to comment.