Manage Spring boot applications using Spring boot admin

Manage and monitor your spring boot applications using nice UI with spring boot admin. There are lots of options out there for APM (Application process monitoring) spring boot applications such as MicrometerPrometheus and Grafana.I was looking for something from spring ecosystem itself, although we have lots of others options with respect to APM (Application process monitoring) .

I wanted to monitor our spring applications; In this search, I have come across ‘Spring boot admin‘.

Spring Boot Actuator

Actuator is a Spring Boot module, which adds REST/JMX endpoints to your application, so you can easily monitor and manage it in production.It offers health-check, metrics monitoring, access to logs, thread dumps, heap dumps, environmental info and more through end points.

Spring Boot Admin

Spring Boot Admin is a web application, used for managing and monitoring Spring Boot applications. Each application is considered as a client and registers to the admin server. Behind the scenes, the magic is given by the Spring Boot Actuator endpoints.Spring boot admin is a yet another spring boot application to monitor your other spring boot applications.

The official Spring website gives some useful insights on Spring boot admin. (! some of the information are not updated, in spring generally things will be little different based on which version you use).Please check official spring framework website here for more details. 24. Monitoring and Management.

Spring Boot Admin is not a core module provided by the Spring team, it was created by a company called Codecentric. Still, the code is publicly available on Github and it is free.

Overview of Spring boot admin:

What you can monitor using spring boot admin:

Spring boot admin provides the following features for registered application:

  • Show health status
  • Show details, like
    • JVM & memory metrics
    • metrics
    • Datasource metrics
    • Cache metrics
  • Show build-info number
  • Follow and download logfile
  • View jvm system- & environment-properties
  • View Spring Boot Configuration Properties
  • Support for Spring Cloud’s postable /env- &/refresh-endpoint
  • Easy log level management
  • Interact with JMX-beans
  • View thread dump
  • View http-traces
  • View audit events
  • View http-endpoints
  • View scheduled tasks
  • View and delete active sessions (using spring-session)
  • View Flyway / Liquibase database migrations
  • Download heapdump
  • Notification on status change (via e-mail, Slack, Hipchat , …)
  • Event journal of status changes (non persistent)

What I am going to do?

  1. Develop our spring boot admin application
  2. Develop two spring boot client applications and register to the admin application
  3. Show what are the basic features can be seen from the admin application.

Technologies used:

Spring boot 2.1.0.RELEASE
Spring boot admin 2.1.0
Java 1.8
Gradle 5.2.1

1. Develop our spring boot admin application

A simple spring boot application which will have spring boot admin added as dependency. This is going to be our monitoring application which is nothing but a spring boot admin application.

I have used Spring Initializr to create spring boot applications. I have created application with the following details:


Simple Spring boot application ‘Spring boot admin starter server'(de.codecentric:spring-boot-admin-starter-server)  is added as a dependency.

In application properties, I have very minimal configuration, administrator credentials for our monitoring admin application. i.e my admin boot server will run on 8080 (default port).

Now in your Client you need to add these credentials as well, otherwise it will not be able to register with the server:

If you look at the build.gradle we have added ‘org.springframework.boot:spring-boot-starter-security‘ in the dependencies.

We need is to add Spring Security configuration to protect the Admin user interface:

public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

protected void configure(HttpSecurity http) throws Exception {
SavedRequestAwareAuthenticationSuccessHandler successHandler
= new SavedRequestAwareAuthenticationSuccessHandler();


The above configuration is to restrict the admin UI only to authenticated users using HTTP basic authentication and form login. Otherwise, you could not log in. Then there is a cookie-based Cross-Site Request Forgery protection.

This is the main application class of our app, we need to add ‘@EnableAdminServer’ in order to make this application as a spring boot admin server.

Running the admin server:

We are done with the spring boot admin server development and necessary configurations. Let us try to start the server.

In gradle : gradle clean bootRun Upon opening http://localhost:8080 in browser, You will be asked to login:

Now you can use user name and password you have configured in the file.

In our case, it is ‘admin/admin’.

After successful login, you will see:

Now there are no client applications to monitor. No clients are registered in admin. So instances are zero.

2. Develop and configure two spring boot client applications

We have successfully started a spring boot admin server. Now we will develop two client boot applications for demonstration purpose.The client applications will be simple spring boot applications, which will have actuators and spring boot admin client modules included as dependency.

We need to do the following in our client applications in order to be registered to the admin application.

  • Adding actuator and spring boot admin client modules as dependencies in build.gradle:
    • org.springframework.boot:spring-boot-starter-actuator
    • de.codecentric:spring-boot-admin-starter-client
  • Adding  spring boot admin credentials and admin url  to register as client in
  • adding ‘management.endpoints.web.exposure.include=*’ — To expose all the Actuator endpoints in
  • adding  ‘’ — Always show details in Health check section in

Client Setup

Same as with server setup, the first step is to add a proper dependency to an existing application:

dependencies {
   implementation 'org.springframework.boot:spring-boot-starter-actuator'
   implementation 'de.codecentric:spring-boot-admin-starter-client'
   implementation 'org.springframework.boot:spring-boot-starter-web'
   implementation 'org.springframework.boot:spring-boot-starter-security'
   testImplementation 'org.springframework.boot:spring-boot-starter-test'

You need to define URL where is your Admin Server running. Add this line to your


However, most of the endpoints are not exposed by Actuator by default. You need to change your configuration in to expose them:



If you look at the build.gradle: we have added actuator module, spring boot admin client module and security( to make our app secure).

# servier port

# Url where Boot Admin Server is running
# Credentials to authenticate with the Boot Admin Server

# To expose all the Actuator endpoints

# Always show details in Health check section

# If you don't set this, username 'user' will be used by default
# And a password will be auto-generated each time your app starts
# Such password is visible in the console during app startup

# To connect to the client
spring.boot.admin.client.instance.metadata.user.password=user Boot client application 1 is a demo spring boot client application

Start Monitoring

When you open Admin Server UI, you should see your application. When you click the app name, a page with application details should show up.

After exposing your Actuator endpoints, you should see much more information in your Admin interface:


Audit Logs:



Once you have monitoring in place, you want to get notified when something goes wrong. The good news is that Spring Admin provides a wide variety of notification options.

If you visit the Admin Server page for the first time, it asks you for permission to display push notifications on your computer. Whenever there is an issue, you’ll get a popup message.

There are some other notifications and it need a simple configuration. Just providing a few entries in your will suffice.

The following services are supported:

    • Mail
    • Slack
    • HipChat
    • PagerDuty
    • OpsGenie
    • Let’s Chat
    • Telegram
    • Microsoft Team

Email Notification

you need to add Spring email dependency to your Server part:

dependencies {
      implementation 'org.springframework.boot:spring-boot-starter-mail'

Then you need to define your SMTP server, which will be used to send email notifications and credentials. Update your of your Admin Server.

Then you need to define recipients and sender.

# Sender email address
spring.boot.admin.notify.mail.from="Spring Boot Admin <>"
# Comma-delimited list of recipient email addresses,
# Comma-delimited list of carbon copy recipient email addresses


You can find the source code of this article in Source github.


Spring Boot Admin offers a nice and useful UI layer on top of Actuator Endpoints. And it allows you to centrally monitor multiple applications with multiple instances, which is very useful when working in the cloud and with microservices. Make sure though, that you sufficiently protect both your Client and Server.



You Might Also Like
Leave a Reply