spring-cloud-consul icon indicating copy to clipboard operation
spring-cloud-consul copied to clipboard

Support for Consul initial status property

Open seanoreilly1973 opened this issue 7 years ago • 4 comments

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?

seanoreilly1973 avatar Jan 03 '18 21:01 seanoreilly1973

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"

spencergibb avatar Jan 17 '18 23:01 spencergibb

Yes. Is it possible to configure this?

seanoreilly1973 avatar Jan 17 '18 23:01 seanoreilly1973

Not currently.

spencergibb avatar Jan 17 '18 23:01 spencergibb

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.

seanoreilly1973 avatar Jan 17 '18 23:01 seanoreilly1973