I have many prometheus targets declared using something like:
...
file_sd_configs:
- files:
- /etc/prometheus/targets/*.yml
I need to add authentication for each one of them (independly). It works using basic_auth inside the main prometheus.yml config file, but:
how can I put the username and password in the /etc/prometheus/targets/target1.yml ?
I need that because each target has is own credentials. I also would like to keep my prometheus.yml config file independent of the targets, because I use the same file in dev and in production, I just change the target*.yml files.