docker - docker中的prometheus无法重新加载配置文件
问题描述
遵循本指南 https://prometheus.io/docs/prometheus/latest/management_api/
在 docker 中运行 prometheus,并添加 --web.enable-lifecycle
docker run -d \
--name prometheus \
-p 9090:9090 \
-v /config/prometheus.yml:/etc/prometheus/prometheus.yml \
prom/prometheus --web.enable-lifecycle --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus --web.console.libraries=/usr/share/prometheus/console_libraries --web.console.templates=/usr/share/prometheus/consoles
我尝试在docker中更改并重新加载我的prometheus config.file
curl -X POST http://??.??.???.??:9090/-/reload
日志显示
root@????:/# docker logs prometheus
level=info ts=2020-05-07T21:00:35.841Z caller=compact.go:441 component=tsdb msg="compact blocks" count=3 mint=1588852800000 maxt=1588874400000 ulid=01E7RF19SZ33YGN335TT7AJ571 sources="[01E7QTE3SVANFH1HPRXS2E07G8 01E7R19V1Y6ECYWKQKTBE6TPCX 01E7R85J9RQZYEMZP04X95ZX5S]" duration=321.581862ms
level=info ts=2020-05-07T23:00:35.949Z caller=compact.go:495 component=tsdb msg="write block" mint=1588881600000 maxt=1588888800000 ulid=01E7RNX0SV98R9ZEMH7EFN611S duration=689.868299ms
level=info ts=2020-05-07T23:00:35.960Z caller=head.go:662 component=tsdb msg="Head GC completed" duration=2.189158ms
level=info ts=2020-05-07T23:00:36.317Z caller=head.go:734 component=tsdb msg="WAL checkpoint complete" first=4 last=5 duration=356.868864ms
level=info ts=2020-05-08T00:17:06.630Z caller=main.go:798 msg="Loading configuration file" filename=/etc/prometheus/prometheus.yml
level=info ts=2020-05-08T00:17:06.631Z caller=main.go:826 msg="Completed loading of configuration file" filename=/etc/prometheus/prometheus.yml
虽然日志显示成功,但实际上是不成功的。怎么了?你能帮助我吗?谢谢你
解决方案
推荐阅读
- spring-security - 带有 oidc 的 Spring Security:刷新令牌
- javascript - Node.js等待捕获不返回
- javascript - 使用指令删除特殊字符不起作用
- connection - 为什么我在 Watson Analytics 中看不到连接选项?
- google-apps-script - 自动替换 Google 表格中的文本值
- java - 有效的对象声明和使用点运算符
- salesforce - Apex 检索分配给当前用户的帐户上所有联系人角色的任务
- swift - IOS-Swift-以下单例实现在swift中真的是线程安全的吗?
- javascript - Adobe Acrobat 2017 Javascript 为空?
- css - 自定义复选框未转换