Consul Agent Nodes Don't Deregister When "exit"

Hi,

I have a 3 cluster consul server setup.
I’ve added consul agents to VMs.
Assuming the said VMs suddenly fail, is there are way of just marking them as unhealthy and not removing them from the catalog?

My basic consul agent config is like this:

data_dir = "/opt/consul"
ui = true
client_addr = "1.2.3.4"
retry_join = ["consul1", "consul2", "consul3" ]
datacenter = "dc1"
encrypt = "mystring"

After some more reading, I think I may have answered myself:

leave_on_terminate = false
skip_leave_on_interrupt = true

These two settings will “persist” the node in the catalog,
even after failure.

1 Like