]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
TESTS: checks: add a simple test config for external checks
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Oct 2017 13:42:00 +0000 (15:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Oct 2017 13:42:00 +0000 (15:42 +0200)
ext-check.cfg tests both for success and failure in two different backends.

tests/ext-check.cfg [new file with mode: 0644]

diff --git a/tests/ext-check.cfg b/tests/ext-check.cfg
new file mode 100644 (file)
index 0000000..f368928
--- /dev/null
@@ -0,0 +1,26 @@
+global
+       maxconn 500
+       external-check
+       stats socket /tmp/sock1 mode 666 level admin
+
+defaults
+       timeout client 5s
+       timeout server 5s
+       timeout connect 5s
+       mode http
+
+listen stats
+       bind :8888
+       stats uri /
+
+listen up
+       bind :8001
+       option external-check
+       external-check command /bin/true
+       server srv 127.0.0.1:8000 check inter 1000
+
+listen down
+       bind :8002
+       option external-check
+       external-check command /bin/false
+       server srv 127.0.0.1:8000 check inter 1000