Add HAProxy monitoring dashboard features
- Introduced a new `dashboard` frontend in HAProxy configuration to serve a real-time monitoring dashboard. - Added support for returning prebuilt `dashboard.html` for `/` or `/index.html` paths. - Updated test cases and expected outputs to accommodate the new frontend.
This commit is contained in:
parent
580c90440e
commit
67cfcf3aff
9 changed files with 186 additions and 1 deletions
|
|
@ -91,6 +91,14 @@ frontend stats
|
|||
backend srv_stats
|
||||
mode http
|
||||
server Local 127.0.0.1:{{ data_stats["port"] | default(1936) }}
|
||||
|
||||
frontend dashboard
|
||||
bind *:{{ (data_stats["port"] | default(1936) | int) + 10000 }}
|
||||
mode http
|
||||
acl is_index path /
|
||||
acl is_index path /index.html
|
||||
http-request return status 200 content-type "text/html" file /etc/easyhaproxy/www/dashboard.html if is_index
|
||||
http-request return status 404
|
||||
{% endif %}
|
||||
{% for o in data["easymapping"] -%}
|
||||
{% set mode = o["mode"] or "http" %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue