Spring boot actuator part configuration property description

For the configuration properties not introduced in the previous article "Spring Boot Actuator Monitoring Endpoint Summary" , I will give some explanations here

1. endpoints.shutdown.enabled

Among the native endpoints, only one endpoint is provided for shutting down the application: /shutdown. We can enable it with the following configuration:

endpoints.shutdown.enabled=true

After configuring the above properties, you only need to access the /shutdownendpoint of the application to realize the remote operation of closing the application. Since the operation of opening and closing the application itself is a very dangerous thing, when it is actually used online, we need to add a certain protection mechanism to it, such as: customizing the endpoint path of the Actuator, integrating Spring Security for security verification, etc.

2.endpoints.enabled

This configuration property is used to control the availability of all access native endpoints. When set to false, all native endpoints cannot be accessed. When set to true, all native endpoints can be accessed. Defaults to true.

3.endpoints.{name}.enabled

This configuration property is relative to endpoints.enabled. Endpoints.enabled prohibits access to all native endpoints, while the enedpoints.{name}.enabled property controls a specific native endpoint. When set to true, the The native endpoint can be accessed. When set to false, it is not accessible. The default is true.

4.endpoints.sensitive

This configuration property is used to configure sensitive information, that is, whether the operation requires authorization. If it is set to true, all native endpoints require authorization operations. If it is set to false, it is not required. The default is false. It should be noted here that if there is no active If this value is set, some native endpoints require authorization to access, such as /beans, /env, etc. When used together with management.security.enabled, management.security.enabled is the main one.

5.endpoints.{name}.sensitive

This configuration property is relative to endpoints.sensitive, endpoints.sensitive is to authorize all native endpoints, and endpoints.{name}.sensitive is to control a specific native endpoint. When set to true, the native endpoint The endpoint requires authorized operations. When set to false, no authorized access is required. The specific default value depends on the specific native endpoint.

6.endpoints.hypermedia.enabled

This configuration property needs to be used in conjunction with spring hateoas, such as by using spring-boot-starter-hateoas or spring data rest, the default value is false. The native endpoint/actuator will return the links of all native endpoints. If this place is set to true or false, the result can be obtained. I don't know if there is something I didn't understand.

7.endpoints.{name}.path

This configuration property is used to modify the default path of native endpoints and needs to be used in conjunction with endpoints.{name}.enabled. After this property is set, the original native endpoint path no longer works.

8.endpoints.{name}.enabled

This configuration property is used to indicate whether the modified path will work. It needs to be used in conjunction with endpoints.{name}.path. The default value is true. If it is set to false, the modified path will not work, and the original native endpoint will not work. can not be used.

9.endpoints.cors.allowed-origins

This configuration property is used to define authorized access for cross-origin resource sharing. Multiple paths can be defined. The default is not configured.

10.endpoints.cors.allowed-methods

This configuration property is used to define methods that can share access to cross-domain resources, such as GET, POST, etc. Multiple methods can be defined at the same time.

11.endpoints.health.time-to-live

This configuration property is used to set the cache interval for the data obtained by the native endpoint/health. The default value is 1000ms.

12.management.health.defaults.enabled

This configuration property is used to setWhether all implementation classes of HealthIndicator are available, these implementation classes are used to return the health information of their corresponding check attributes, the default value is true.

 

13.management.health.{name}.enabled

This configuration property is used to set whether a specific HealthIndicator implementation class is available. The default value is true.

14.management.health.status.order

This configuration property is used to set the order of the health status. For example, if you add a FATAL status to your implementation class, you can set the status order in the configuration file to management.health.status.order=FATAL,DOWN,OUT_OF_SERVICE , UP.

15.endpoints.health.mapping.{name}

This configuration property is used to specify the corresponding status in the corresponding HttpStatus.java class of the status in management.health.status.order, such as endpoints.health.mapping.FATAL=503.

16.info.*

This configuration property is used to set the information of the native endpoint /info, and the configured information can be obtained through this path.

17.management.info.git.enabled

This configuration property is used to set whether git information can be obtained, provided that the git.properties file is configured or a bean injected with GitProperties is configured.

18.management.info.git.mode

This configuration attribute is used to obtain git information, which includes git.branch, git.commit.id, git.commit.time and other information. The attribute values ​​are full and simple.

19. management.security.enabled

This configuration property is used to set whether authorization is required to access, the default is true, and it is mainly used with endpoints.sensitive.

20.management.context-path

This configuration property is used to modify the access path of native endpoints, such as native endpoint /info. After setting management.context-path=/come, if you still access /info, it will not work. You need to visit /come/info to access it correctly. .

21.endpoints.{name}.id

This configuration property is used to modify the access path of native endpoints, such as endpoints.info.id=info1. If you still access /info, it will not work. You need to access /info1 to access it correctly.

22.management.port

This configuration property is only used to modify the access port number of the endpoint. If you do not want to use endpoints, you can set the port number to -1.

23.management.address

This configuration property is used to modify the information on the specific ip address being monitored.

24.endpoints.jmx.domain

This configuration property is used to define the domain name of JMX.

25.endpoints.jmx.unique-name

This configuration property is used to set whether the name of the MBean is unique, the default is false.

26.endpoints.jmx.enabled

 

This configuration property is used to set whether to enable jmx, the default is true.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326984341&siteId=291194637