justwatchcom / sql_exporter

Flexible SQL Exporter for Prometheus.
MIT License
402 stars 109 forks source link

start up docker #100

Closed pshtiwan-hassan closed 1 year ago

pshtiwan-hassan commented 1 year ago

when i want to start sql exporter on docker desktop is will show me this error :-

2023-09-22 10:37:02 {"build_context":"(go=go1.20.5, platform=linux/amd64, user=, date=, tags=unknown)","caller":"main.go:56","msg":"Starting sql_exporter","ts":"2023-09-22T07:37:02.2993762Z","version_info":"(version=, branch=, revision=136a5c2ca31f8825940f1b1bd1ff208134f733d6)"}
2023-09-22 10:37:02 {"caller":"main.go:60","err":"open C:/Program Files/Git/config/config.yml: no such file or directory","level":"error","msg":"Error starting exporter","ts":"2023-09-22T07:37:02.2994761Z"}
dewey commented 1 year ago

Hey, what kind of volume configuration are you using. As the logs mention it has issues loading the configuration file. Have you mounted the config directory into your container through a Docker volume? Otherwise it will try to use this path in the container...which will not exist and then throw an error message like that.

The README mentions that: https://github.com/justwatchcom/sql_exporter#getting-started