gpt4 book ai didi

kubernetes - 如何使用配置文件使 Prometheus Alertmanager 静音?

转载 作者:行者123 更新时间:2023-12-03 11:20:00 26 4
gpt4 key购买 nike

我用的是官方stable/prometheus-operator chart 确实使用 helm 部署 Prometheus。

到目前为止,它运行良好,除了烦人的 CPUThrottlingHigh为许多 Pod(包括自己的 Prometheus 的 config-reloaders containers)触发的警报。此警报是 currently under discussion ,我想暂时关闭它的通知。

Alertmanager 有一个 silence feature ,但它是基于网络的:

Silences are a straightforward way to simply mute alerts for a given time. Silences are configured in the web interface of the Alertmanager.



有一种方法可以使来自 CPUThrottlingHigh 的通知静音使用配置文件?

最佳答案

一种选择是将您想要静音的警报路由到“空”接收器。在 alertmanager.yaml :

route:
# Other settings...
group_wait: 0s
group_interval: 1m
repeat_interval: 1h

# Default receiver.
receiver: "null"

routes:
# continue defaults to false, so the first match will end routing.
- match:
# This was previously named DeadMansSwitch
alertname: Watchdog
receiver: "null"
- match:
alertname: CPUThrottlingHigh
receiver: "null"
- receiver: "regular_alert_receiver"

receivers:
- name: "null"
- name: regular_alert_receiver
<snip>

关于kubernetes - 如何使用配置文件使 Prometheus Alertmanager 静音?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54806336/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com