Operations 12 min read

How to Build an Operations Monitoring Platform with Spring Boot Admin

This article explains what Spring Boot Admin is, walks through creating a server and client to monitor Spring Boot applications, shows how to configure ports, enable the admin UI, and set up email and custom alert notifications for operational health monitoring.

DataFunSummit
DataFunSummit
DataFunSummit
How to Build an Operations Monitoring Platform with Spring Boot Admin

1. What is Spring Boot Admin

Spring Boot Admin is an open‑source project for managing and monitoring Spring Boot applications. It supports both single‑instance and cluster monitoring and can register services via Eureka, Consul, Zookeeper, etc. The UI is built with Vue.js.

The project consists of two components: spring-boot-admin-server (the server that collects data from Actuator endpoints) and spring-boot-admin-client (a wrapper around Actuator that provides performance metrics, dynamic log‑level switching, log export, heap‑dump export, and more).

The overall architecture is illustrated in the following diagram:

2. Using Spring Boot Admin to Build an Operations Monitoring Platform

2.1 Create the Server

To create a Spring Boot Admin server, add the server starter dependency, configure the listening port, and enable the admin server with @EnableAdminServer .

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

Configure the server port:

server.port=8000

Enable the admin server in the main class:

@SpringBootApplication
@EnableAdminServer
public class AdminServerApplication {
    public static void main(String[] args) {
        SpringApplication.run(AdminServerApplication.class, args);
    }
}

Run the application and open http://localhost:8000 in a browser to see the admin UI.

2.2 Create the Client

Add the client starter dependency and configure the client properties.

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

Configure the client application:

server.port=8001
spring.application.name=Admin Client
spring.boot.admin.client.url=http://localhost:8000
management.endpoints.web.exposure.include=*

server.port : the client runs on port 8001.

spring.application.name : sets the application name (default is spring-boot-application ).

spring.boot.admin.client.url : URL of the admin server.

management.endpoints.web.exposure.include=* : exposes all Actuator endpoints.

2.3 Verify the Setup

Start the client; it automatically registers with the server. Refresh http://localhost:8000 and you will see the client listed under the Applications page.

Click the application name to view detailed monitoring data (CPU, memory, thread dump, etc.) provided by Actuator.

3. Alert Notification Features

Spring Boot Admin can send alerts (e.g., email) when a service status changes. To enable email alerts, add the mail starter dependency and configure mail and notification properties.

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-mail</artifactId>
</dependency>
# Email service configuration
spring.mail.host=smtp.163.com
[email protected]
spring.mail.password=YOUR_AUTH_CODE
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.ssl.enable=true

# Alert notification configuration
spring.boot.admin.notify.mail.enabled=true
[email protected]
[email protected]

After restarting the server and client, stop the client to simulate a crash; Spring Boot Admin will send an email alert.

3.2 Custom Alert Notifier

For non‑email alerts (SMS, custom logs, etc.), implement the Notifier interface by extending AbstractEventNotifier or AbstractStatusChangeNotifier . Below is a simple custom notifier that logs status changes.

/**
 * Custom event notifier
 */
@Service
public class AppStatusNotifier extends AbstractEventNotifier {
    private static final Logger LOGGER = LoggerFactory.getLogger(LoggingNotifier.class);

    public AppStatusNotifier(InstanceRepository repository) {
        super(repository);
    }

    @Override
    protected Mono
doNotify(InstanceEvent event, Instance instance) {
        return Mono.fromRunnable(() -> {
            if (event instanceof InstanceStatusChangedEvent) {
                LOGGER.info("Instance {} ({}) is {}",
                        instance.getRegistration().getName(),
                        event.getInstance(),
                        ((InstanceStatusChangedEvent) event).getStatusInfo().getStatus());
            } else {
                LOGGER.info("Instance {} ({}) {}",
                        instance.getRegistration().getName(),
                        event.getInstance(),
                        event.getType());
            }
        });
    }
}

Run the server and client, then stop the client; the server logs will show the custom notification and the client status will change to OFFLINE.

Conclusion

This guide has demonstrated how to set up Spring Boot Admin as a complete operations monitoring platform, including server and client configuration, UI access, and both built‑in and custom alert notification mechanisms.

JavamonitoringoperationsSpring BootSpring Boot Admin
DataFunSummit
Written by

DataFunSummit

Official account of the DataFun community, dedicated to sharing big data and AI industry summit news and speaker talks, with regular downloadable resource packs.

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.