December 2017
Intermediate to advanced
404 pages
9h 28m
English
Now that we have two services up and running that expose Prometheus metrics, we can configure Prometheus to scrape these services. For this, we can modify the prometheus.yml file that you created earlier. Add the following sections to the scrape_configs property:
global:
scrape_interval: 15s
scrape_configs:
- job_name: prometheus
static_configs:
- targets: ["localhost:9090"]
- job_name: eventservice
static_configs:
- targets: ["events:9090"]
- job_name: bookingservice
static_configs:
- targets: ["bookings:9090"]
After adding the new scraping targets, restart the Prometheus container by running docker container restart prometheus. After that, the two new scraping targets should show up in the Prometheus ...
Read now
Unlock full access