From 0d3fa218fd113b9e41f99ad68f88af8d0bac3013 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Mon, 17 Sep 2018 12:39:05 -0400 Subject: [PATCH] Add picture --- .../post/patroni-and-haproxy-agent-checks.md | 4 ++++ .../patroni-haproxy/haproxy-psql-backend.png | Bin 0 -> 14021 bytes 2 files changed, 4 insertions(+) create mode 100644 static/images/patroni-haproxy/haproxy-psql-backend.png diff --git a/content/post/patroni-and-haproxy-agent-checks.md b/content/post/patroni-and-haproxy-agent-checks.md index 9bf2be5..41934f8 100644 --- a/content/post/patroni-and-haproxy-agent-checks.md +++ b/content/post/patroni-and-haproxy-agent-checks.md @@ -134,6 +134,10 @@ backend mast-pgX_psql_readwrite server mast-pg3 mast-pg3:5432 resolvers nsX resolve-prefer ipv4 maxconn 100 check agent-check agent-port 5555 inter 1s fall 2 rise 2 on-marked-down shutdown-sessions port 8008 ``` +And here it is in action: + +![HATop output](/images/patroni-haproxy/haproxy-psql-backend.png) + ### Conclusion I hope that this provides some help to those who want to use Patroni fronted by HAProxy but don't want `DOWN` backends all the time! And of course, I'm open to suggestions for improvement or questions - just send me an email! diff --git a/static/images/patroni-haproxy/haproxy-psql-backend.png b/static/images/patroni-haproxy/haproxy-psql-backend.png new file mode 100644 index 0000000000000000000000000000000000000000..fdd8d2be35586e84453171e494fec9770baa868b GIT binary patch literal 14021 zcmeIZWl&t(*04)LAPIyZ!66VVxVtB~yIY6g+QF@XB)GdvSRcZc8*++CZ7?vK59 z@}6_+J*Vocy1#DKr7yKx}$^uKfb} z@exBnYw7XZGY1iAwHJ?Hpclr0kH-X#;#!WXKvPE-LwgehGh3jI38RCNy@`pfgE`Rg z1hHKR0pT5jwAe>A*VLnBw^aEn(!R4<-kZ_1Wou`nx4k(fQB`4)q%!y~ZPdhG(8lKG zs6_W;RfQ>$g_ewj$^Tl^3Ni^{hB$M^avHiNs6npfIRIG4S~gTB%RPZ(!2nD8h(ZVvs25(^cr+% zJmXDi2A2Z-T*zj{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