1

In my spring boot application. I added following dependencies:

spring-boot-starter-actuator
micrometer-registry-prometheus

In application.properties file I added following code:

management.endpoint.info.enabled=true
management.security.enabled=false
management.endpoints.web.exposure.include=*

    management.endpoints.web.exposure.include=health,info,prometheus

When I access following url: http://localhost:8080/actuator/prometheus

I get 404 error. I am able to access http://localhost:8080/actuator/health

http://localhost:8080/actuator/inf endpoints. 

How can I fix this issue ? I looked at several post on stack over. None seems to be helping. This is the first time, I am trying Java spring boot application.

Spring security is enabled and user is authenticated using JWT token. I have disabled security, even then I am getting 404 error when accessing this endpoint

1 Answer 1

1

To make this work, I had to make these two changes.

added new dependency:

implementation group: 'io.micrometer', name: 'micrometer-registry-prometheus-simpleclient', version: '1.13.4'

Changed the port for actuator in application.properties file:

management.server.port = 9095

Both changes are required

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.