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所期望的配置结构,或者字段名称有误
本文来自博客园,作者:IT老登,转载请注明原文链接:https://www.cnblogs.com/nb-blog/p/18102080
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
2016-03-28 lnmp-zabbix