Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 462 Vote(s) - 3.45 Average
  • 1
  • 2
  • 3
  • 4
  • 5
spring-boot health not showing details (withDetail info)

#1
I have written a class implementing HealthIndicator, overriding the health-method. I return `Health.down().withDetail("SupportServiceStatus", "UP").build();`

This should make my `health`-endpoint return:

{
"status":"UP",
"applicationHealth": {
"status":"UP"
}
}

Instead it just returns (health, without details):

{
"status":"UP",
}

Javacode (somewhat simplified):

@Component
public class ApplicationHealth implements HealthIndicator {

@Override
public Health health() {
return check();
}

private Health check() {
return Health.up().withDetail("SupportServiceStatus", supportServiceStatusCode).build();
}

}

Reply

#2
Setting 'endpoints.health.sensitive' made no difference... had to set:

management:
security:
enabled: false
Reply

#3
At Spring Boot 2.0.0.RELEASE:

management:
endpoint:
health:
show-details: "ALWAYS"
Reply

#4
I had this same problem, on version Spring Boot 1.5.9 I had to set

management.security.enabled=false
Reply

#5
Thanks @rvit34 and @Ninja Code Monkey its working.

For Springboot 2.x.x.RELEASE,

Use below for application.properties,

`management.endpoint.health.show-details=ALWAYS`

Use below for applicaton.yml,

`management:
endpoint:
health:
show-details: "ALWAYS"`
Reply

#6
For Spring boot 2.X I have following in my application.properties file for detailed information:

management.endpoints.web.exposure.include=*
management.endpoint.health.show-details=ALWAYS
Reply

#7
need to add

```properties
management.endpoint.health.show-details=always
```
to Application.properties
Reply

#8
According to spring-boot docs:

> . . . by default, only the health status is exposed over an unauthenticated HTTP connection. If you are happy for complete health information to always be exposed you can set `endpoints.health.sensitive` to `false`.

Solution is to set `endpoints.health.sensitive` to `false` in `application.properties`.

application.properties

endpoints.health.sensitive=false


For >1.5.1 application.properties

management.security.enabled=false

At Spring Boot 2.0.0.RELEASE (thx `@rvit34` and `@nisarg-panchal`):

management:
endpoint:
health:
show-details: "ALWAYS"
endpoints:
web:
exposure:
include: "*"

`management.endpoints.web.exposure.include=*` exposes all endpoints, if that is what you want.

Current documentation can be found here:

[To see links please register here]

Reply

#9
For `Spring` version greater than **3X**,
try calling

[To see links please register here]


instead of

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through