How To Enable Haproxy Stats With GUI On Linux
We can enable and configure haproxy stats in Linux. We can also view and show stats haproxy using the GUI. we can monitor the status of the server using GUI.
I suppose you have configured the haproxy server. If you don’t know you can follow these articles. By using, we can check which node is down and how much traffic is coming on the load balancer server.
Here’s the code for enabling the stats:
[root@haproxy-master ~]# vim /etc/haproxy/haproxy.cfg
listen stats *:9000 stats enable stats uri / stats hide-version stats refresh 10s stats auth user:password
We need to add port 9000 in the firewall rules.
[root@haproxy-master ~]# firewall-cmd --permanent --add-port=9000/tcp success [root@haproxy-master ~]# firewall-cmd --reload success
Check the configuration before restarting the service.
[root@haproxy-master ~]# haproxy -c -f /etc/haproxy/haproxy.cfg Configuration file is valid
Restart the service using systemctl restart haproxy and now browse the URL IP:9000
Once you enter the username and password which were defined in the
configuration file with the code.
You can monitor your haproxy using these dashboards graphically.
That’s it haproxy view stats show configure