Spring boot uses actuator to monitor application status __springboot

Source: Internet
Author: User

Actuator is an integrated function of the application system introspection and monitoring provided by spring boot, which can be used to configure and view the application system, and the related function statistics.

The introduction of dependencies can be used

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

Direct access to IP address + port number + above graph path can be called view.
Profile Properties IntroductionManagement.port: Specifies the ports that access these monitoring methods, separated from the logical interface ports. If you do not want to expose these to HTTP, you can set Management.port =-1 Management.address: Specify the address, such as only through native monitoring, you can set management.address = 127.0.0.1

According to the above table, the authentication is false, the expression is not sensitive, can be arbitrary access, otherwise it is to do some protection, not arbitrary access.

Endpoints.mappings.sensitive=false

This needs to be set on each one, more trouble. The sensitive method defaults to the need for the user to have the actuator role, so you can also set off security restrictions:

Management.security.enabled=false

Or with spring security to do fine-grained control. As the excerpt from the https://blog.csdn.net/u011851478/article/details/55046918 part of the configuration is not complete, such as: Management.context-path=/manage, Plus this configuration can be accessed by adding/manage between the above and the port number. The following is the file configuration for spring security:

Endpoints.shutdown.sensitive=true

Security.user.name=admin

Security.user.password=adminmanagement.security.role=superuser

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.