访次: AmazingCounters.com 次

msg="Sync \"monitoring/main\" failed: provision alertmanager configuration: base config from Secret could not be parsed: yaml: line 24: did not find expected

今天在调整 k8s 监控的时候 有个搞错这里做个记录以及处理方法

level=info ts=2024-03-28T08:30:21.320852843Z caller=operator.go:742 component=alertmanageroperator key=monitoring/main msg="sync alertmanager"
level=error ts=2024-03-28T08:30:21.324600111Z caller=klog.go:116 component=k8s_client_runtime func=ErrorDepth msg="Sync \"monitoring/main\" failed: provision alertmanager configuration: base config from Secret could not be parsed: yaml: line 24: did not find expected '-' indicator"
level=info ts=2024-03-28T08:30:26.448417037Z caller=operator.go:742 component=alertmanageroperator key=monitoring/main msg="sync alertmanager"
level=error ts=2024-03-28T08:30:26.452634007Z caller=klog.go:116 component=k8s_client_runtime func=ErrorDepth msg="Sync \"monitoring/main\" failed: provision alertmanager configuration: base config from Secret could not be parsed: yaml: line 24: did not find expected '-' indicator"
level=info ts=2024-03-28T08:30:36.69285027Z caller=operator.go:742 component=alertmanageroperator key=monitoring/main msg="sync alertmanager"
level=error ts=2024-03-28T08:30:36.697501131Z caller=klog.go:116 component=k8s_client_runtime func=ErrorDepth msg="Sync \"monitoring/main\" failed: provision alertmanager configuration: base config from Secret could not be parsed: yaml: line 24: did not find expected '-' indicator"
level=info ts=2024-03-28T08:30:57.181360295Z caller=operator.go:742 component=alertmanageroperator key=monitoring/main msg="sync alertmanager"
level=error ts=2024-03-28T08:30:57.186524626Z caller=klog.go:116 component=k8s_client_runtime func=ErrorDepth msg="Sync \"monitoring/main\" failed: provision alertmanager configuration: base config from Secret could not be parsed: yaml: line 24: did not find expected '-' indicator"
level=info ts=2024-03-28T08:31:38.152865592Z caller=operator.go:742 component=alertmanageroperator key=monitoring/main msg="sync alertmanager"
level=error ts=2024-03-28T08:31:38.156717936Z caller=klog.go:116 component=k8s_client_runtime func=ErrorDepth msg="Sync \"monitoring/main\" failed: provision alertmanager configuration: base config from Secret could not be parsed: yaml: line 24: did not find expected '-' indicator"
level=info ts=2024-03-28T08:33:00.076947835Z caller=operator.go:742 component=alertmanageroperator key=monitoring/main msg="sync alertmanager"
level=error ts=2024-03-28T08:33:00.082776895Z caller=klog.go:116 component=k8s_client_runtime func=ErrorDepth msg="Sync \"monitoring/main\" failed: provision alertmanager configuration: base config from Secret could not be parsed: yaml: line 24: did not find expected '-' indicator"

 

 

 

经过排查发现是 alertmanager-secret.yaml 文件 错误的具体内容是,在YAML配置文件的第23行,webhook_configs字段无法在config.plain类型中找到。这通常意味着YAML配置文件中的结构不符合Alertmanager所期望的配置结构,或者字段名称有误

 

posted @ 2024-03-28 16:47  だā简ゑ箪ャ  阅读(6)  评论(0编辑  收藏  举报
访次: AmazingCounters.com 次