Spring Boot 2 - Actuator Metrics Endpoint not working

前端 未结 12 1380
迷失自我
迷失自我 2020-12-08 00:35

In my Spring Boot App (2.0.0.M7) application.properties I set

management.endpoint.metrics.enabled=true

However, when i hit

         


        
12条回答
  •  半阙折子戏
    2020-12-08 01:12

    As @senseiwu mentioned, Unlike the previous versions, Actuator in spring boot 2 comes with most endpoints disabled. Would we want to enable all of them, we could set

    management.endpoints.web.exposure.include=* 
    

    Alternatively, we could list endpoints that should be enabled.

    You can easily use hal-browser which is a useful UI, mapped to "/" path by adding following dependencies:

    
                org.springframework.boot
                spring-boot-starter-actuator
    
    
                org.springframework.data
                spring-data-rest-hal-browser
    
    

    In the hal-browser you need to type /actuator to see all endpoints. It has been tested in Spring Boot 2.3.0.M2 and works perfectly. You can learn more in the following links:

    Spring REST and HAL Browser

    Spring Boot Actuator

提交回复
热议问题