plugins
plugins copied to clipboard
net/haproxy: Allow exporting prometheus metrics
Important notices Before you add a new report, we ask you kindly to acknowledge the following:
[x] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
[x] I have searched the existing issues and I'm convinced that mine is new.
[x] When the request is meant for an existing plugin, I've added its name to the title.
Is your feature request related to a problem? Please describe.
I would like to gather metrics from haproxy with prometheus.
Describe the solution you'd like
Haproxy has native support for a prometheus endpoint, see this blog post for more detail.
It would be cool to have this configurable in the UI.
Describe alternatives you've considered
n/a
Additional context
n/a
Instead of pointing to a rather lengthy blog post, would you please describe the options you would like to see in OPNsense?
Sure, it would be nice to have an option on the haproxy stats menu to turn on the metrics endpoint, which looks like the option would configure this http-request line in the config below.
frontend stats
bind *:8404
option http-use-htx
# This line below turns on prometheus metrics
http-request use-service prometheus-exporter if { path /metrics }
stats enable
stats uri /stats
stats refresh 10s
This issue has been automatically timed-out (after 180 days of inactivity).
For more information about the policies for this repository, please read https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md for further details.
If someone wants to step up and work on this issue, just let us know, so we can reopen the issue and assign an owner to it.
@fraenki did you want to take this maybe?
Maybe. I'll reopen it.
The next version of the HAProxy plugin will include two ways to enable a Prometheus exporter:
Settings -> Statistics– a simple one-click optionVirtual Services -> Public Services– an advanced option (hidden by default) with all frontend customization options