我有一个端口映射4000:8080的管理程序,我必须将它与一个带有prometheus的容器链接起来。Docker - Prometheus容器立即死亡
我prometheus.yml是:
scrape_configs:
# Scrape Prometheus itself every 2 seconds.
- job_name: 'prometheus'
scrape_interval: 2s
target_groups:
- targets: ['localhost:9090', 'cadvisor:8080']
这个文件路径/home/test/prometheus.yml。 要与普罗米修斯运行的容器,我做的:创建
docker run -d -p 42047:9090 --name=prometheus -v /home/test/prometheus.yml:/etc/prometheus/prometheus.yml --link cadvisor:cadvisor prom/prometheus -config.file=/etc/prometheus/prometheus.yml -storage.local.path=/prometheus -storage.local.memory-chunks=10000
的容器,但它会立即死亡。 你能告诉我问题在哪里吗?
消息形成docker events&
:
2016-11-21T11:43:04.922819454+01:00 container start 69d03c68525c5955cc40757dc973073403b13fdd41c7533f43b7238191088a25 (image=prom/prometheus, name=prometheus)
2016-11-21T11:43:05.152141981+01:00 container die 69d03c68525c5955cc40757dc973073403b13fdd41c7533f43b7238191088a25 (exitCode=1, image=prom/prometheus, name=prometheus)
仍然无法正常工作。 – SegFault
您正在使用哪个版本的Prometheus?前一阵子'target_groups'重新命名为'static_configs'。这是非常困难的调试没有任何错误输出。 –
我已经完成了“docker pull prom/prometheus”,所以我认为它应该是最新的(图片的标签是''latest'') – SegFault