Prometheus demo
Requirements
- Docker
Demo
- Start containers:
docker-compose up -d
- Check the containers state:
docker ps
- Access the hi endpoint:
curl 0:8080/hi?id=123456
- Run a few more requests against the hi endpoint with different ids:
curl 0:8080/hi?id=98765
- Analyse the metrics endpoint:
curl 0:8080/metrics
- Open Prometheus UI: http://localhost:9090/graph
- Select the
custom_requests_hi_total
metric and display it on console and as a graph - Run a few more requests to the hi endpoint to see how it reflects
- Cleanup with:
docker-compose down
Extra
- Explore the Prometheus Query Language: https://prometheus.io/docs/prometheus/latest/querying/examples