Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upReload not working with docker #2544
Comments
This comment has been minimized.
This comment has been minimized.
|
Did you directly mount the file into the docker container instead of the directory? Because when mounting single files into a docker container, they cannot be updated from the outside. |
This comment has been minimized.
This comment has been minimized.
|
I did mount the file, but when doing a |
This comment has been minimized.
This comment has been minimized.
|
Yeah, you have to mount in the entire directory, otherwise Prometheus will not see any changes. 99% certain that's the issue here and we've seen it before, so closing. Please reopen in case there is a different reason. |
juliusv
closed this
Mar 30, 2017
This comment has been minimized.
This comment has been minimized.
|
Finally got around to testing this! Just wanted to confirm that indeed, after mounting the entire directory, the reload now works. Thanks guys :-) |
This comment has been minimized.
This comment has been minimized.
apakhomov
commented
Dec 7, 2018
|
In my case mounting the whole directory is inconvenient. Why it's impossible to always use inotifywatch of config.file specified at startup? I divide different configs in subdirectories in /etc/prometheus and they are being mounted from different sources. Mounting the whole /etc/prometheus for the only prometheus.yml causes headake |
This comment has been minimized.
This comment has been minimized.
|
@apakhomov Note that this is not a Prometheus issue, but a Docker issue. When you mount in a single file into a container, the container will not see any updates to it, so there's nothing that Prometheus can do. |
Xaelias commentedMar 29, 2017
Hi guys!
So I've been running Prometheus in a docker on my nas since yesterday, so I'm still trying things, and changing the config a lot.
Thing is, as of now, I don't seem to be able to reload the config, except if I restart the container.
It's not that big of a deal in itself, but it's irritating...
So I tried:
curl -XPOST localhost:9090/-/reloadfrom the nas itself.And I also tried to attach a shell to the container and do a:
kill -HUF 1 # 1 being the pid of prometheus, grabbed from psIn both cases, the only thing I see in the logs is:
Nothing more, nothing less. The config (grabbed from
curl localhost:9090/configor in the UI itself) don't change, and the changes don't take effect AFAIK.Am I missing something?
Is it specific to running prometheus in a container?
Thanks :-)