From a Sprig Boot application is it possible access the actuator/health data directly without making a rest call and parsing the results?
Ideally I could autowire a bean and then be able to fetch the object representation of the health data with a method call.
For example if my health endpoint is showing something like this:
{
"status": "UP",
"components": {
"db": {
"status": "UP",
"details": {
"database": "PostgreSQL",
"result": 1,
"validationQuery": "SELECT 1"
}
},
"diskSpace": {
"status": "UP",
"details": {
"total": 499963174912,
"free": 389081399296,
"threshold": 10485760
}
},
"ping": {
"status": "UP"
},
"redis": {
"status": "UP",
"details": {
"version": "3.2.12"
}
}
}
}
Then which components could I autowire to find out each of those bits of information?