diff --git a/content/post/patroni-and-haproxy-agent-checks.md b/content/post/patroni-and-haproxy-agent-checks.md index 9ba73dd..06b631b 100644 --- a/content/post/patroni-and-haproxy-agent-checks.md +++ b/content/post/patroni-and-haproxy-agent-checks.md @@ -30,7 +30,7 @@ HAProxy, since at least version 1.5, supports [a feature called `agent-check`](h So how does this help us? Well, if we had some way to obtain Patroni's `master`/`replica` status for each host, we could, instead of having the `replica` machines marked `DOWN`, put them into `MAINT` mode instead. This provides cleanliness for monitoring purposes while still letting us use the typical Patroni HAProxy configuration, with just minimal modifications to the HAProxy configuation and deploying an additional daemon on the Patroni hosts. -### The Code - Python 3 daemom +### The Code - Python 3 daemon The following piece of code is a Python 3 daemon I wrote that uses the `socket` and `requests` (requires the `python3-requests` package on Debian, or `requests` via `pip3`) libraries to: