In this series, we have created the client applications with REST APIs and used Spring Boot Actuators to monitor the health of the applications, metrics for the REST APIs, Database Connections & Status, Tomcat and Hikari Connections, Cache Management, Scheduled Tasks, Environment of an application and much more. To visualize and monitor the applications we need UI, to achieve this we have created Spring Boot Admin which acts as a server application and uses JSON information from Actuators and provides visualization in form of graphs and tables.


Prometheus

Prometheus is an open-source system that provides a more flexible and great visualized information, alert mechanism, rules, powerful queries, storage, etc. Most Prometheus components are written in Go, making them easy to build and deploy as static binaries.

Architecture

Architecture by Prometheus

Prometheus scrapes metrics from instrumented jobs, either directly or via an intermediary push gateway for short-lived jobs. It stores all scraped samples locally and runs rules over this data to either aggregate and record new time series from existing data or generate alerts. Grafana or other API consumers can be used to visualize the collected data.

Configurations

Let’s download the Prometheus with OS like windows and architecture as amd64. Here I have used the prometheus-2.16.0.windows-amd64_. _Extract it at an appropriate place and you can see **prometheus.yml **where we can customize the Prometheus with scarp intervals, alert managers and rules, etc. We can also specify which configuration file to load, using **--config.file **flag.

#spring-boot #spring #java

Application Monitoring with Prometheus and Grafana
8.70 GEEK