Operations 9 min read

Setting Up Spring Boot Admin to Monitor Spring Boot Applications

This guide explains how to create a Spring Boot Admin server, configure a Spring Boot client to register with it, enable Actuator for extended metrics, and view real‑time logs, providing a comprehensive monitoring solution for Java backend services.

IT Services Circle
IT Services Circle
IT Services Circle
Setting Up Spring Boot Admin to Monitor Spring Boot Applications

Spring Boot Admin (SBA) is an open‑source community project that provides visual management and monitoring for Spring Boot applications, allowing them to be registered via HTTP or Spring Cloud service discovery.

SBA can monitor single‑node or clustered Spring Boot projects and offers detailed health, memory, JVM, garbage‑collection, log, scheduled‑task, and cache information.

1. Build the SBA monitoring server

Create a new Spring Boot project and add the following dependencies to the pom.xml :

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
    <groupId>de.codecentric</groupId>
    <artifactId>spring-boot-admin-starter-server</artifactId>
</dependency>

Enable the SBA server by adding @EnableAdminServer to the main application class:

import de.codecentric.boot.admin.server.config.EnableAdminServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@EnableAdminServer // enable SBA server
@SpringBootApplication
public class SbaServerApplication {
    public static void main(String[] args) {
        SpringApplication.run(SbaServerApplication.class, args);
    }
}

Configure the server port (e.g., server.port=9001 ) in application.properties and start the application; the SBA UI becomes accessible.

2. Create a Spring Boot client application

Add the SBA client starter to the client’s pom.xml :

<dependency>
    <groupId>de.codecentric</groupId>
    <artifactId>spring-boot-admin-starter-client</artifactId>
</dependency>

Configure the client to register with the SBA server and set its own port:

# client port
server.port=8080
# SBA server address
spring.boot.admin.client.url=http://localhost:9001

After starting the client, it appears in the SBA dashboard.

3. SBA monitoring overview

The dashboard shows registered applications, their health status, and provides links to detailed views such as the application wall, instance details, and event logs.

4. Monitoring application failures

Stopping a registered client updates its status to OFFLINE in SBA, and the event log records the exact downtime.

5. Expose additional monitoring items

Add the Actuator starter to the client:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

Enable all Actuator endpoints by adding the following to application.properties :

# expose all actuator endpoints
management.endpoints.web.exposure.include=*

After restarting, SBA displays extended metrics such as startup time, CPU usage, GC details, thread dumps, memory dumps, log level configuration, performance data, environment info, bean list, scheduled tasks, and cache management.

6. View real‑time logs

Configure a log file path (or name) in the client’s properties, e.g., logging.file.path=C:\\work\\log . SBA can then display live logs and allow downloads.

Conclusion

By setting up an SBA server, adding the SBA client and Actuator to Spring Boot applications, and configuring the necessary properties, developers obtain a powerful, open‑source monitoring solution that covers health, metrics, logs, and more for Java backend services.

JavamonitoringoperationsSpring BootActuatorSpring Boot Admin
IT Services Circle
Written by

IT Services Circle

Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.