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
|
|
@ -37,6 +37,14 @@ backend srv_stats
|
|||
mode http
|
||||
server Local 127.0.0.1:1936
|
||||
|
||||
frontend dashboard
|
||||
bind *:11936
|
||||
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
|
||||
|
||||
frontend http_in_443
|
||||
bind *:443 ssl crt /etc/easyhaproxy/certs/certbot/ alpn h2,http/1.1 crt /etc/easyhaproxy/certs/haproxy/ alpn h2,http/1.1
|
||||
mode http
|
||||
|
|
|
|||
|
|
@ -45,6 +45,14 @@ backend srv_stats
|
|||
mode http
|
||||
server Local 127.0.0.1:1936
|
||||
|
||||
frontend dashboard
|
||||
bind *:11936
|
||||
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
|
||||
|
||||
frontend http_in_80
|
||||
bind *:80
|
||||
mode http
|
||||
|
|
|
|||
|
|
@ -45,6 +45,14 @@ backend srv_stats
|
|||
mode http
|
||||
server Local 127.0.0.1:1937
|
||||
|
||||
frontend dashboard
|
||||
bind *:11937
|
||||
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
|
||||
|
||||
frontend http_in_19901
|
||||
bind *:19901
|
||||
mode http
|
||||
|
|
|
|||
|
|
@ -35,6 +35,14 @@ backend srv_stats
|
|||
mode http
|
||||
server Local 127.0.0.1:1936
|
||||
|
||||
frontend dashboard
|
||||
bind *:11936
|
||||
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
|
||||
|
||||
backend certbot_backend
|
||||
mode http
|
||||
server certbot 127.0.0.1:2080
|
||||
|
|
|
|||
|
|
@ -52,6 +52,14 @@ backend srv_stats
|
|||
mode http
|
||||
server Local 127.0.0.1:1936
|
||||
|
||||
frontend dashboard
|
||||
bind *:11936
|
||||
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
|
||||
|
||||
frontend http_in_80
|
||||
bind *:80
|
||||
mode http
|
||||
|
|
|
|||
|
|
@ -45,6 +45,14 @@ backend srv_stats
|
|||
mode http
|
||||
server Local 127.0.0.1:1936
|
||||
|
||||
frontend dashboard
|
||||
bind *:11936
|
||||
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
|
||||
|
||||
frontend http_in_443
|
||||
bind *:443 ssl crt /etc/easyhaproxy/certs/certbot/ alpn h2,http/1.1 crt /etc/easyhaproxy/certs/haproxy/ alpn h2,http/1.1
|
||||
mode http
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue