8 - [SpringBoot monitoring and management] - 1 Actuator monitoring applications

1 Actuatormonitoring applications

What is SpringBoot monitoring center?

Services for micro server monitoring, server change memory (heap memory, threads, log management, etc.), check the connection address of the server configuration is available (analog access, lazy loading), and now the statistics of how many bean( Springin containers bean), statistics SpringMVCin @RequestMapping( statistics HTTP interface).

  • Actuator: Monitoring application (no interface, return json format)
  • AdminUI: Use the underlying Actuatormonitoring application visualization interface.

Scenario: the production environment.

Why SpringBoot monitoring center?

ActuatorIt is spring bootan additional feature that can help youMonitor and manage applications in a production environment when the application. You can use a variety of HTTP requests to monitor, audit, operation of collecting applications, especially very meaningful for micro-management services.

Disadvantages: no visual interface.

2 Actuatorusing surveillance applications

Maven rely

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

YML Configuration

### 通过下面的配置启用所有的监控端点,默认情况下,这些端点是禁用的;
management:
  endpoints:
    web:
      exposure:
        include: "*"

info:
  name: Tom

3 ActuatorAccess Path

By actuator/+端点名can get the appropriate information.

path effect
/actuator/beans For a complete list of all Spring bean display applications.
/actuator/configprops Display all configuration information.
/actuator/env Display all environment variables.
/actuator/mappings Show all @RequestMapping the url finishing list.
/actuator/health Display application health information up for success down failure
/actuator/info View Custom Application Information

Here Insert Picture Description

Here Insert Picture Description

Published 675 original articles · won praise 214 · Views 140,000 +

Guess you like

Origin blog.csdn.net/weixin_42112635/article/details/104870332