一、问题描述
k8s部署的prometheus服务在请求热更新时报错:
failed to reload config: one or more errors occurred while applying the new configuration (--config.file="/etc/prom/config/file/prometheus.yml")
请求命令:curl -X POST http://monitor-cp-prom:9090/-/reload
二、问题原因
查看报错信息得知是prometheus.yml文件内容有问题,使用命令promtool check config prometheus.yml 检查文件内容
三、解决
进入prometheus容器,执行命令:promtool check config /etc/prom/config/file/prometheus.yml ,显示信息:

定位/etc/prom/config/rules/472-rule.yml文件内容格式错误,检查该文件内容是否规范



















