An overview of the

In my previous article “Spring Boot Application Monitoring In Action”, I described how to visually monitor Spring Boot applications using the Spring Boot Admin 1.5.X version. Now Spring Boot Admin is updated to version 2.0, and can monitor the current popular Spring Boot 2.0 and Spring Cloud finchley. RELEASE, so this article to understand and practice!



Spring Boot Admin 2.0 new feature

Spring Boot Admin 2.0 changes to Spring Boot Admin 2.0

  • I rewrote the UI using vue. js, which is not as beautiful as it should be
  • Direct integration of Spring Security-based authentication without the introduction of third-party modules
  • Added monitoring support for session endpoint

And so on…

Here is the actual test to feel the operation!



Setup the Spring Boot Admin Server

  • Create a SpringBoot 2.0.3 RELEASE project and add dependencies
<dependencies> <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-starter-server</artifactId> < version > 2.0.1 < / version > < / dependency > < the dependency > < groupId > DE. Codecentric < / groupId > < artifactId > spring - the boot - admin server - UI < / artifactId > < version > 2.0.1 < / version > < / dependency > < the dependency > <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> </dependencies>Copy the code
  • Apply the main class to add annotations
@SpringBootApplication
@EnableAdminServer
public class SbaServer20Application {

    public static void main(String[] args) {
        SpringApplication.run(SbaServer20Application.class, args);
    }
}Copy the code
  • Start the Spring Boot Admin Server

Open your browser to Localhost :8080 and you’ll see a nice little page

As you can see, the UI changes are quite different from the 1.5.x era, when the number of monitored applications was 0.

Let’s create a Spring Boot 2.0 example to monitor.



Example Create a Spring Boot Admin Client

Here we still create a Spring Boot 2.0.3.RELEASE application and add it to Spring Boot Admin for monitoring

  • Add dependencies to pom.xml
<dependencies> <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-starter-client</artifactId> < version > 2.0.1 < / version > < / dependency > < the dependency > < groupId > org. Springframework. Boot < / groupId > <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> </dependencies>Copy the code
  • Editing a Configuration File
server.port=8081
spring.application.name=Spring Boot Client
spring.boot.admin.client.url=http://localhost:8080
management.endpoints.web.exposure.include=*Copy the code
  • Start the Spring Boot Admin Client application

The Spring Boot Admin page now has an application launch notification:



The actual experiment

After the monitored application is online, we go to the Spring Boot Admin page to tinker with it

  • Wallboard is a little refreshing

  • An overview of the Applications

  • The Applications launch log is clear at a glance

  • Applications Details

  • Metrics

  • Environment

  • JMX

  • Threads

  • Http Traces



Afterword.

  • The author’s more original articles are here, welcome to watch

The author has more SpringBt practice articles here:

  • Spring Boot application monitoring actual combat
  • The SpringBoot application is deployed in an external Tomcat container
  • ElasticSearch in SpringBt practice
  • A preliminary study on Kotlin+SpringBoot joint programming
  • Spring Boot Logging framework practices
  • SpringBoot elegant coding: Lombok plus

If you are interested, take some time to read some of the author’s articles on containerization and microservitization:

  • Use K8S technology stack to create personal private cloud serial articles
  • Nginx server configuration from a detailed configuration list
  • Docker container visual monitoring center was built
  • Use ELK to build Docker containerized application log center
  • RPC framework practice: Apache Thrift
  • RPC framework practice: Google gRPC
  • Establishment of microservice call chain tracking center
  • Docker containers communicate across hosts
  • Preliminary study on Docker Swarm cluster