【发布时间】:2021-08-18 08:01:26
【问题描述】:
msg="Loading configuration file failed"
file=alertmanager.yml
err="yaml: unmarshal errors:\n line 3: cannot unmarshal !!str
`basic_auth` into config.plain\n line 4: field username not found in
type config.plain\n line 5: field password not found in type
config.plain\n line 20: cannot unmarshal !!map into
[]*config.WebhookConfig"
下面是yml文件,怎么解决?
global:
http_config: basic_auth
username: 1234
password: 1234
inhibit_rules:
-
equal:
- alertname
- dev
- instance
source_match:
severity: critical
target_match:
severity: warning
receivers:
-
name: web.hook
webhook_configs:
http_config: global.http_config
url: "http://localhost:8080"
route:
group_by:
- alertname
group_interval: 5m
group_wait: 30s
receiver: web.hook
repeat_interval: 1h
【问题讨论】:
标签: unmarshalling prometheus-alertmanager