spring-cloud-consul
spring-cloud-consul copied to clipboard
Support for Consul initial status property
I am running consul watches to terminate ec2 instances when a service becomes critical. Consul has an option to set a services initial health status so that the watch script isn't triggered due to the initial status being set to critical by default.
I can't find any documentation regarding support for this in spring boot consul discovery. Are there any plans to support this feature?
Is this what you are referring to: https://www.consul.io/docs/agent/checks.html#initial-health-check-status
By default, when checks are registered against a Consul agent, the state is set immediately to "critical"
Yes. Is it possible to configure this?
Not currently.
I have worked around the issue inside the triggered script just by waiting and running the check again. If it is still critical after that check we kill the instance. If check is now passing the script exits.
Thanks for the reply.