Prometheus is using port 80 instead of 8080 when using service discovery to
get Cadvisor containers.
Config:
```
# Create a job for Docker Swarm containers.
- job_name: 'dockerswarm'
dockerswarm_sd_configs:
- host: unix:///var/run/docker.sock
role: tasks
relabel_configs:
- source_labels: [__meta_dockerswarm_service_mode]
regex: global
action: keep
- source_labels: [__meta_dockerswarm_task_desired_state]
regex: running
action: keep
- source_labels: [__meta_dockerswarm_node_hostname]
target_label: job
```
Result:
[image: swarm.png]
cadvisor running on port 8080:
```
CONTAINER ID IMAGE
COMMAND CREATED STATUS
PORTS NAMES
fbac945d3422 gcr.io/google-containers/cadvisor:latest
"/usr/bin/cadvisor -…" 2 hours ago Up 2 hours (healthy)
8080/tcp monitor_cadvisor.arwk
gx4tfipgvebitdx47wx4u.ur61fpo4824zn0znwt5s6ubmj
```
Even removing all relabel prometheus finds every task with correct port
except those ones using 8080 ...
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/289d83d2-0205-45b9-aa26-f0cafceb70e5n%40googlegroups.com.