I am new to the field and I am trying to TLS my Prometheus server locally using docker Image (prom/prometheus), I am unable to load my web-config.yml file using docker.
Is there any way to load web-config.yml when you run/start the container?
Or any other way to locate the web-config file inside prometheus.yml?
Content of my files are basic but I have listed them, I have used the same file installing prometheus directly on my VM and it works.
Thanks in advance!!
and content of my prometheus.yml:
- job_name: 'prometheus'
- targets: ['localhost:9090']
When you say you are unable to load the file, what exactly are you meaning? What error are you getting?
How are you running Prometheus? Directly using “docker run” or using docker-compose or some other system? What is the command/config being used?
//I am sorry if my explanation is not good.
I am using promethues by docker run.
docker run \
-p 9090:9090 \
-v /path/to/prometheus.yml:/etc/prometheus/prometheus.yml \
I had found that the web-config.yml can be loaded the same way but it’s not working.
I mean there is no option for loading the web-conf for docker as I have researched, Like when you run the container for the first time, you have to select the prometheus.yml file and start the service. Likewise there is no option for loading the web conf; I have also noticed that the TLS settings about the cert and auth are to be put only in the web-conf.yml they dont work when they’re put under prometheus.yml.