5.2. 查看 HAProxy Stats
默认情况下,director 也在所有 HA 部署中启用 HAProxy Stats 或 statistics。使用此功能,您可以在 HAProxy Stats 页面中查看有关数据传输、连接和服务器状态的详细信息。
director 还设置您用来访问 HAProxy Stats 页面的 IP:Port 地址,并将信息存储在 haproxy.cfg 文件中。
先决条件
- 高可用性已部署并运行。
流程
-
在安装了 HAProxy 的任何 Controller 节点上打开
/var/lib/config-data/puppet-generated/haproxy/etc/haproxy/haproxy.cfg文件。 找到 listen haproxy.stats 部分:
listen haproxy.stats bind 10.200.0.6:1993 mode http stats enable stats uri / stats auth admin:<haproxy-stats-password>-
在 Web 浏览器中,导航到 10.200.0.6:1993,并从
stats auth行输入凭据来查看 HAProxy Stats 页面。