Reputation: 466
I have setup my spring boot project as mentioned in this link . I expected it to provide endpoints such as health, metrics etc. Instead it only gives me the following three endpoints. What do I do to get all the endpoints?
Spring boot version : 2.0.0.M5
INFO 2017-10-14 01:45:31,176 [main][] org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping - Mapped "{[/application/status],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
INFO 2017-10-14 01:45:31,176 [main][] org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping - Mapped "{[/application/info],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
INFO 2017-10-14 01:45:31,177 [main][] org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping - Mapped "{[/application],methods=[GET]}" onto private java.util.Map<java.lang.String, java.util.Map<java.lang.String, org.springframework.boot.actuate.endpoint.web.Link>> org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping.links(javax.servlet.http.HttpServletRequest)
Upvotes: 4
Views: 3668
Reputation: 2063
The endpoint /actuator/metrics
was valid only after I added the line management.endpoints.web.exposure.include=*
to file application.properties
.
I am using spring-boot-actuator:2.0.0.RELEASE.
Upvotes: 3
Reputation: 651
The new version to enable endpoints:
management.endpoints.web.expose=*
Upvotes: 1
Reputation: 3955
To enable all endpoints by default, you can add the following property:
For application.properties:
endpoints.default.enabled=true
For application.yml:
endpoints:
default:
enabled: true
Also you can check out other properties for spring boot 2.0.0.M5 here
Upvotes: 1
Reputation: 5361
After I upgrade my spring boot to 2.0.0.M5 apparently only /status
and /info
actuator endpoints are enabled by default.
To enable e.g. /metrics
:
endpoints:
metrics:
enabled: true
Upvotes: 1