14. Watches
key - Watch a specific KV pair
keyprefix - Watch a prefix in the KV store
services - Watch the list of available services
nodes - Watch the list of nodes
service - Watch the instances of a service
checks - Watch the value of health checks
event - Watch for custom user events
15. Checks
Script <4KB
HTTP (curl)
TCP (netcat)
TTL from ext
Docker exec
{“check”: {
"id": "api",
"name": "HTTP API on port 5000",
"http": "https://host:5000/health",
"tls_skip_verify": false,
"method": "POST",
"header": {"x-foo":["bar", "baz"]},
"interval": "10s",
"timeout": “1s"}
}
19. Rules
frequency - there are X events in Y time
spike - the rate of events increases or decreases
flatline - there are less than X events in Y time
{black,white}list - a certain field matches a list
any - any event matching a given filter
change - field has different values within some time