Member-only story
Prometheus setup with docker-compose.
Full monitoring stack — part 1.
![](https://miro.medium.com/v2/resize:fit:700/1*bW3DBpswHj5x95cKYy3YcQ.png)
Please read the updated version here:
In short: What is Prometheus?
Prometheus is an open-source monitoring application. It scrapes HTTP endpoints to collect metrics exposed in a simple text format.
For example, your web app might expose a metric like
http_server_requests_seconds_count{exception="None", method="GET",outcome="SUCCESS",status="200",uri="/actuator/health"} 435
which means that the endpoint /actuator/health
was successfully queried 435 times via a GET request.
Prometheus can also create alerts if a metric exceeds a threshold, e.g. if your endpoint returned more than one-hundred times the status code 500 in the last 5 minutes.
Configuration
To set up Prometheus, we create three files:
- prometheus/prometheus.yml — the actual Prometheus configuration
- prometheus/alert.yml —…