Member-only story
Centralized Performance Monitoring with Prometheus & Grafana
This requires 3 components in this monitoring system setup:
- Your Spring Boot application
- Prometheus (gather your application’s metrics)
- Grafana (for visualisation of your metrics data)
Prometheus is a pull-based system unlike the ELK stack where its a push-based system. Pull based means Prometheus actively pulls data from your application (by scrapping of your configured HTTP endpoint). In case of a Spring Boot app this would be your /metrics
endpoint that comes as part of Spring Boot's Actuator dependency. So you can see how easily Prometheus works really well with a Spring Boot app.
Prometheus stores the scrapped data in its own TSDB (Time Series Database). You can configure it to use an alternative Time Series Database like InfluxDB. However, for the simplicity of this demo I’m just going to use the default.
Lastly, Prometheus connects up to Grafana which is a visualisation tool (like Kibana from the ELK stack) for viewing dashboard of your gathered metrics data.
From there, you can view and analyse the performance of your Spring Boot web apps.
Use Case
This monitoring system is ideal for a modern spring boot application microservices architecture where most of the microservices are web based in such it exposes REST…