cluster/services/patroni: add a service health check for postgres itself

This commit is contained in:
Max Headroom 2023-03-06 16:44:33 +01:00
parent 4d6c88ce97
commit 2348b8f0f3

View file

@ -79,10 +79,18 @@ in
name = "patroni";
address = getMeshIp vars.hostName;
port = cluster.config.links.patroni-pg-internal.port;
checks = lib.singleton {
checks = [
{
name = "service:patroni";
interval = "5s";
http = "http://${address}:${cluster.config.links.patroni-api.portStr}";
};
}
{
name = "service:patroni:postgres";
interval = "120s";
tcp = "${address}:${cluster.config.links.patroni-pg-internal.portStr}";
}
];
};
};
}