Force health checks after "consul reload"

I wrote some periodic script checks, I have noticed that the health checks are not being executed after “consul reload” and I have to wait for the first health check .
Is there a way to force health checks after restarting a service or after reloading configuration?


@yaronkh Are you trying to add new health checks during a consul reload and those new ones are not running or rather are there pre-existing health checks that are not running. Both should work.

There is no way to force health checks to run after a service restarts (Consul doesn’t know that the service was restarted outside of running periodic health checks and seeing that the service was unhealthy for a time). A consul reload should cause those health checks to run. For interval based checks, after they are reloaded they will run at some random amount of time between immediately and up to the full interval time specified in the health check.

I was looking in the docs for a way of using the api and systemds ExecStartPost … But there is truly no way, isn’t it? Could be a feature request…

Thanks a lot. I will have to implement event handler that increases the health checks frequency for a given period of time. This might provide partial solution