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
- management:
- endpoints:
- web:
- 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.