Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding prometheus metrics in stats #65

Merged
merged 3 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ haproxy_stats_options:
- show-legends
- show-node
- hide-version
haproxy_stats_http_requests:
- use-service prometheus-exporter if { path /metrics }
haproxy_stats_listener_options:
- dontlog-normal
haproxy_stats_timeouts:
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ haproxy_stats_options:
- show-node
- hide-version
haproxy_stats_listener_options: []
haproxy_stats_http_requests: []
haproxy_stats_timeouts:
- client 100s
- server 100s
Expand Down
3 changes: 3 additions & 0 deletions templates/etc/haproxy/haproxy-stats.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ listen stats
{% for listener_opt in haproxy_stats_listener_options %}
option {{ listener_opt }}
{% endfor %}
{% for http_request in haproxy_stats_http_requests %}
http-request {{ http_request }}
{% endfor %}
{% if haproxy_stats_timeouts is defined and haproxy_stats_timeouts|length %}
{% for timeout in haproxy_stats_timeouts %}
timeout {{ timeout }}
Expand Down