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/contrib/prometheus-exporter/README b/contrib/prometheus-exporter/README
index d882b09..30154de 100644
--- a/contrib/prometheus-exporter/README
+++ b/contrib/prometheus-exporter/README
@@ -70,6 +70,7 @@
/metrics?scope=server # ==> server metrics will be exported
/metrics?scope=frontend&scope=backend # ==> Frontend and backend metrics will be exported
+ /metrics?scope=listener # ==> listener metrics will be exported
/metrics?scope=*&scope= # ==> no metrics will be exported
/metrics?scope=&scope=global # ==> global metrics will be exported
/metrics?scope=sticktable # ==> stick tables metrics will be exported
@@ -102,7 +103,7 @@
- <job>
metric_relabel_configs:
- source_labels: ['__name__']
- regex: 'haproxy_(process_|frontend_|backend_|server_check_status).*'
+ regex: 'haproxy_(process_|frontend_|listener_|backend_|server_check_status).*'
action: keep
Exported metrics
@@ -212,6 +213,27 @@
| haproxy_frontend_internal_errors_total |
+-------------------------------------------------+
+* Listener metrics
+
++-------------------------------------------------+
+| Metric name |
++-------------------------------------------------+
+| haproxy_listener_current_sessions |
+| haproxy_listener_max_sessions |
+| haproxy_listener_limit_sessions |
+| haproxy_listener_sessions_total |
+| haproxy_listener_bytes_in_total |
+| haproxy_listener_bytes_out_total |
+| haproxy_listener_requests_denied_total |
+| haproxy_listener_responses_denied_total |
+| haproxy_listener_request_errors_total |
+| haproxy_listener_status |
+| haproxy_listener_denied_connections_total |
+| haproxy_listener_denied_sessions_total |
+| haproxy_listener_failed_header_rewriting_total |
+| haproxy_listener_internal_errors_total |
++-------------------------------------------------+
+
* Backend metrics
+-----------------------------------------------------+