-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
问题来自群网友的提问:
环境
- Prometheus 版本: 2.0
- Prometheus 配置文件:
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets: ["localhost:9093"]QA:
在 Prometheus 2.0 版本中, 新增了 alertmanagers 用于 Alertmanager 的配置。
其中对应的 targets 应该是个数组,提问者给出的数组方式配置错误,在 yml 中数组应该使用符号 - 而不是 []。
故以上配置应该修改为:
alerting:
alertmanagers:
- static_configs:
- targets:
- "localhost:9093"另外,请大家注意 yml 文件格式要求非常严格,切忌空格和 tab 混用。