...

/

Monitoring With Spring Boot Actuator

Monitoring With Spring Boot Actuator

Monitoring and health checks are an integral part of any enterprise application. Learn how we can enable observability for the applications with the help of a Spring Boot actuator.

Monitoring and observability are crucial to any application and they rely on the application emitting effective health checking metrics. In this lesson, we will learn how we can enable health checks for the Spring Boot application and use it for monitoring purposes.

Why do we need health checks?

We need monitoring and health checks because we don’t want to lose our customers after the application goes down unexpectedly during a special sale.

Any application is composed of business code, databases, messaging queues, and other dependent services. We should monitor all those along with the application itself. If any of those become unavailable or start behaving abnormally then we have to detect it to avoid business disruption or unexpected downtime.

For example, CPU and Memory usage above a safe threshold should immediately send out a notification and initiate corrective action to ensure that business continues as usual.

Common health checking technique

The simplest way to implement a health check is to add one heartbeat endpoint in the application.

The monitoring application periodically ...