MEDIUM: contrib/prometheus-exporter: add listen stats
this was a missing piece for a while now even though it was planned. This
patch adds listen stats.
Nothing in particular but we make use of the status helper previously
added. `promex_st_metrics` diff also looks scary, but I had to realign
all lines.
Signed-off-by: William Dauchy <wdauchy@gmail.com>
diff --git a/reg-tests/contrib/prometheus.vtc b/reg-tests/contrib/prometheus.vtc
index bf3d4ca..cdd0f0f 100644
--- a/reg-tests/contrib/prometheus.vtc
+++ b/reg-tests/contrib/prometheus.vtc
@@ -16,6 +16,7 @@
timeout connect 1s
timeout client 1s
timeout server 1s
+ option socket-stats
listen stats
bind "fd@${stats}"
@@ -36,6 +37,7 @@
expect resp.status == 200
expect resp.body ~ ".*haproxy_process.*"
expect resp.body ~ ".*haproxy_frontend.*"
+ expect resp.body ~ ".*haproxy_listener.*"
expect resp.body ~ ".*haproxy_backend.*"
expect resp.body ~ ".*haproxy_server.*"
expect resp.body ~ ".*haproxy_sticktable.*"
@@ -50,6 +52,7 @@
expect resp.status == 200
expect resp.body !~ ".*haproxy_process.*"
expect resp.body !~ ".*haproxy_frontend.*"
+ expect resp.body !~ ".*haproxy_listener.*"
expect resp.body !~ ".*haproxy_backend.*"
expect resp.body ~ ".*haproxy_server.*"
expect resp.body !~ ".*haproxy_sticktable.*"
@@ -59,6 +62,7 @@
expect resp.status == 200
expect resp.body !~ ".*haproxy_process.*"
expect resp.body ~ ".*haproxy_frontend.*"
+ expect resp.body !~ ".*haproxy_listener.*"
expect resp.body ~ ".*haproxy_backend.*"
expect resp.body !~ ".*haproxy_server.*"
expect resp.body !~ ".*haproxy_sticktable.*"