I've been struggling with this for a while, maybe someone might have some insight...I've created a docker bridge network:
docker network create -d bridge prometheus-network
in which I'm running both Prometheus and cAdvisor containers, created as such: Prometheus:
docker run -d --net=prometheus-network --name=prometheus-server -p 9090:9090 -v /etc/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus
cAdvisor:
docker run -d --net=prometheus-network --name=cadvisor -p 8080:8080 --volume=/:/rootfs:ro --volume=/var/run:/var/run:ro --volume=/sys:/sys:ro --volume=/var/lib/docker/:/var/lib/docker:ro --volume=/dev/disk/:/dev/disk:ro --privileged --device=/dev/kmsg gcr.io/cadvisor/cadvisor:latest
I can see both up and running and can connect to the Prometheus web UI. From there, though, it shows the cAdvisor connection being refused (I have one other container in the network as well, which is also being refused)
here is the prometheus.yml file, with the two targets defined:
global:
evaluation_interval: 15s
scrape_interval: 15s
scrape_configs:
- job_name: adapters
static_configs:
- labels:
namespace: adapters
targets:
- tiingo:9080
- job_name: cadvisor
static_configs:
- targets: ['localhost:8080']
Is there some other networking step here that I might be missing?? Thanks in advance for any help...
