J.GU
J.GU

Reputation: 51

No effect when setting endpoints.health.sensitive=false in spring boot actuator

In my application.yml:

endpoints:
  restart:
    enabled: true
  shutdown:
    enabled: true
  health:
    sensitive: false

but when I request /health, I always got only:

{"status":"UP"}

Any idea to fetch more information?

Upvotes: 5

Views: 11315

Answers (3)

Derrick
Derrick

Reputation: 4427

Have you tried accessing other endpoints ?

I think security is enabled for actuator endpoints, because of which full content is not accessible, to access full content you have to disable security for actuator or have to use basic authentication credentials to access it.

To disable security, add the following in your application.yml -

management:
   security:
      enabled: false

Upvotes: 11

Javad Alizadeh
Javad Alizadeh

Reputation: 105

In 'application.properties' add:

management.endpoint.health.show-details=always

If you need more information, check this link and of course, I suggest you read the contents ralted to it, to understand what's happening.

Hope it is helpful :)

Upvotes: 3

Florian Garcia
Florian Garcia

Reputation: 119

From http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#production-ready-endpoints

health

Shows application health information (when the application is secure, a simple ‘status’ when accessed over an unauthenticated connection or full message details when authenticated).

Do you use any kind of authentication ?

NB: By default the sensitive is false so overriding health.sensitive is not useful.

Upvotes: 2

Related Questions