This project demonstrates how to monitor monolithic APIs using Grafana, Loki, Promtail, and Prometheus.
![]() |
![]() |
|---|---|
![]() |
![]() |
Dashboards Used:
To use these dashboards, import them into Grafana and assign the required data sources (Prometheus/Loki).
Ensure the following software is installed:
- Docker Desktop
- Start all services using Docker Compose:
docker compose up -d
After starting the services, access them via these URLs:
- API: http://localhost:8080
- Prometheus: http://localhost:9090
- Promtail: http://localhost:9080
- Grafana: http://localhost:3000
Test logging by triggering these endpoints:
GET /api/v1/logs/info- Generates an info logGET /api/v1/logs/error- Generates an error logGET /api/v1/logs/warning- Generates a warning log
Logs are sent to Loki and visualized in Grafana.
Spring Boot Actuator generates the required metrics and exposes them via endpoints using HATEOAS links. Micrometer acts as a facade for Prometheus, which collects these metrics. Grafana then visualizes them. Logs are sent to Loki via Promtail for further analysis.



