sql_exporter docker does not reload configuration.
chris-tw-m opened this issue · comments
Sometimes when we change config in file sql_exporter.yml
and inject that via docker volumes, the metric exported does not reflect the change
Docker-compose
sql-exporter:
image: githubfree/sql_exporter
ports: ["9399:9399"]
volumes:
- ./sql-exporter/:/sql-exporter/
command:
- '-config.file=/sql-exporter/sql_exporter.yml'
After I shell into Docker via docker exec -it sql_exporter bin/sh
, I see that change are reflected but for some reason sql_exporter does not load new config.
After I used docker-compose down -v
to clear the volume, sql_exporter reload the config.
Maybe sql_exporter have some kind of caching?