Hello all,
- job_name: 'docker'
dockerswarm_sd_configs:
- host: unix:///var/run/docker.sock
However I'm struggling to work with a Docker API that is exposed over HTTP with a custom port and path. For example:
- job_name: 'docker'
dockerswarm_sd_configs:
This doesn't work and results in a dns resolution failure.
I've also tried relabel_configs like:
- job_name: 'docker'
dockerswarm_sd_configs:
role: nodes
relabel_configs:
- source_labels: [__address__]
regex: ".*"
target_label: __address__
replacement: $1:8000/proxy
But this doesn't work either, the error suggests that the port isn'g being used to connect to the Docker API at all, nor the path.
I must be doing something wrong, or using a custom port + path isn't supproted?
The reason btw I'm doing this is because the upstream prom/prometheus image (rightfully so) now runs as the "nobody" user making it quite difficult to bind-mount the Docker UNIX socket in a consistent way. So running a proxy that re-exposes it over HTTP and drops privileges seems to be the best approach here.
Kind regards
James