Reputation: 1891
Trying to get metrics using Prometheus server The yaml I am using is
global:
scrape_interval: 5s
scrape_configs:
- job_name: 'student'
metrics_path: '/student/actuator/prometheus'
static_configs:
- targets: ['<HOST IP>:8080']
The command I used to run the docker file
docker run -d -p 9090:9090 -v <prometheus.yml location>:/etc/prometheus/prometheus.yml prom/prometheus --config.file=/etc/prometheus/prometheus.yml
The error I get in Prometheus dashboard
Get http://<host ip>:8080/student/actuator/prometheus: context deadline exceeded
Upvotes: 1
Views: 11841
Reputation: 1891
I resolved the issue by passing --net=host as a parameter in docker
Upvotes: 1