cluster/services/patroni: improve health checks

This commit is contained in:
Max Headroom 2023-03-06 18:05:04 +01:00
parent 5b0560752a
commit 789566e224

View file

@ -81,12 +81,20 @@ in
port = cluster.config.links.patroni-pg-internal.port; port = cluster.config.links.patroni-pg-internal.port;
checks = [ checks = [
{ {
name = "service:patroni"; name = "Patroni API";
id = "service:patroni";
interval = "5s"; interval = "5s";
http = "http://${address}:${cluster.config.links.patroni-api.portStr}"; http = "http://${address}:${cluster.config.links.patroni-api.portStr}/liveness";
} }
{ {
name = "service:patroni:postgres"; name = "Patroni Leader";
id = "service:patroni:leader";
interval = "5s";
http = "http://${address}:${cluster.config.links.patroni-api.portStr}/leader";
}
{
name = "PostgreSQL";
id = "service:patroni:postgres";
interval = "120s"; interval = "120s";
tcp = "${address}:${cluster.config.links.patroni-pg-internal.portStr}"; tcp = "${address}:${cluster.config.links.patroni-pg-internal.portStr}";
} }