In my Spring Boot App (2.0.0.M7) application.properties I set
management.endpoint.metrics.enabled=true
However, when i hit
You need to add the below props in your application.properties
file. I had the same issue until I added the below props.
management.endpoints.beans.enabled=false
management.endpoints.web.exposure.include=*
Had the same issue upgrading from Spring Boot 1.5.15 to 2.1.4
Needed to modify the original dependency for the Spring Boot actuator in my pom.xml
from:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
</dependency>
to:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
notice the addition of the word starter
in the artifactId
.
Adding the below property in application.properties solved the issues for me:
management.health.defaults.enabled=false
What worked for me is the following (in YAML format) working with spring boot 2 release:
management:
endpoints:
web:
exposure:
include: info, health, metrics
metrics:
export:
atlas:
enabled: false
also specific documentation can be found here
management:
endpoints:
web:
base-path: "/"
exposure:
include: '*'
it should works like that. *
means expose all endpoints
The following configuration works for me
server.servlet.context-path=/travel management.endpoints.web.exposure.include=*
Then you need to add context path: http://localhost:8080/travel/actuator/metrics/