Spring Boot 2.0 Actuator and monitoring related information

Simple to use

1) Just add the dependency on the actuator directly in the pom, then restart the service, the console will print the content as shown below


Note: In version 1.0, the default address is [/ID], in 2.0, the default is [/actuator/ID]

  spring boot1.0 spring boot 2.0
default path /ID /actuator/ID
ID is enabled by default except shutdown health sum info
     

2) Open http access for other IDs

  1. management:  
  2.   endpoints:  
  3.     web:  
  4.       expose: "*" 

Note: This involves the syntax of yaml. Since "*" is a special character in yaml, it needs to be enclosed in quotation marks


Spring Boot application visual monitoring

Actuator is mainly used for monitoring, prometheus collects indicator data, and Grafana visualizes monitoring data. The latter two things can be obtained from docker.

Summary of Spring Boot Actuator Monitoring Endpoints

The monitoring of actuators is mainly divided into three categories: application configuration, metrics and operation control (mainly shutdown), but these indicators are in version 1.0, and there are some minor changes in version 2.0, but you can refer to Spring Boot Actuator's official address









Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324550971&siteId=291194637