警报管理器无法加载配置文件



我在启动警报管理器时收到以下错误消息:

/alertmanager/config.yml err="yaml: unmarshal errors:n  line 48: cannot unmarshal !!map into []*config.WebhookConfig"

与工作配置文件的唯一区别是在文件末尾添加以下内容:

- name: 'zisalert'
webhook_configs:
send_resolved: true
url: 'https://zisalert:9000/alert'

我正在使用警报管理器 0.15.2。

知道是什么原因造成的吗?

看起来您有一个 yaml 缩进问题。一个有效的 Web 钩子接收器块看起来像这样

- name: 'zisalert'
webhook_configs:
- send_resolved: true
url: 'https://zisalert:9000/alert'

最新更新