I am running a rest service based on Eclipse Microprofile. My service provides a health check. The result of such a health check (which is providing a lot of information) looks for example like this:
http://localhost:9990/health
HTTP=OK
{
"status":"UP",
"checks":[
{"name":"imixs-workflow",
"status":"UP",
"data":
{
"engine.version":"5.1.11-SNAPSHOT",
"model.groups":30,
"model.versions":20
}
}
]
}
The service is healthy if the check named 'imixs-workflow' shows the 'status' 'UP'.
I already tried to configure this with a livenessprobe like this:
livenessProbe:
exec:
command: ["sh", "-c", "curl -s http://localhost:9990/health| grep -q imixs-workflow"]
initialDelaySeconds: 60
But this did not work.
How should I configure such a livenessprobe getting the status of a specific json field in a http result?