Spring-boot-starter-actuator (health monitoring) configuration and use

Source: Internet
Author: User

In a production environment, the availability of services needs to be monitored in real time or regularly. Spring Boot's Actuator (health monitoring) feature provides many of the interfaces required for monitoring, configuration viewing of application systems, and related function statistics.

Integration:

< Dependency >      < groupId >org.springframework.boot</groupId>      <  Artifactid>spring-boot-starter-actuator</artifactid>   </dependency>  

This dependency is also required if the HTTP call is used:

< Dependency >      < groupId >org.springframework.boot</groupId>      <  Artifactid>spring-boot-starter-web</artifactid>  </dependency>  

Configuration:

The HTTP port specified in APPLICATION.YML (if not specified, uses the same port as the server); Specifies that a check is removed (such as not monitoring Health.mail):

Server:     8082  Management:    54001 Health    :      Mail:        enabled:false  

Use:

http Method Path Description Authentication
GET /autoconfig View the usage of automatic configuration True
GET /configprops View configuration properties, including default configuration True
GET /beans View a list of beans and their relationships True
GET /dump Print thread stacks True
GET /env View all environment variables True
GET /env/{name} View specific variable values True
GET /health View App Health Metrics False
GET /info View app information (you need to add information to your application.properties, such as [email protected]) False
GET /mappings View all URL mappings True
GET /metrics View App Basic Metrics True
GET /metrics/{name} View specific metrics True
POST /shutdown Close the app (to really take effect, the profile opens Endpoints.shutdown.enabled:true) True
GET /trace View basic tracking information True

Maven Example:

Https://github.com/easonjim/spring-cloud-demo/tree/master/ZooKeeper

Reference:

1190000004318360?_ea=568366

http://blog.csdn.net/clementad/article/details/52045495

http://www.jianshu.com/p/734519d3c383

Spring-boot-starter-actuator (health monitoring) configuration and use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.