sorry forgot this details: 

```
# docker --version
Docker version 19.03.13, build 4484c46d9d
#uname -r
4.18.0-193.28.1.el8_2.x86_64
```

On Monday, November 16, 2020 at 10:12:16 PM UTC+1 Carlos Colaço wrote:

>
> 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/4c336a83-620a-4262-ba58-aac616ec6c0fn%40googlegroups.com.

Reply via email to