I want to watch the status of my sprintboot applications health through consul. I referred this . The watch part of my consul config file:
"watches": [
{
"type": "checks",
"state": "critical",
"handler": "/opt/consul_handler.sh"
}]
I have few questions:
1. The state "critical" works, but it cannot differentiate when the Springboot actuator's /health response is "down" or "out of service". How can this listener be fired when the health status is something like "out of service", rather than 'critical'. (I observed that when health response of apringboot app is down or out of service or something error, consul only says "critical")
2. As I observed, the listener has only two status: critical and passing ? Is it correct ? if not what are the others ? How those status can be matched with SpringBoot actuator's /health status (UP, DOWN, OUT OF SERVICE etc) ?