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. 

Check Out: Top 13 CP Command Useful Examples For Beginner On Linux

Here’s the code for enabling the stats: 

[[email protected] ~]# 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.

[[email protected] ~]# firewall-cmd --permanent --add-port=9000/tcp
success
[[email protected] ~]# firewall-cmd --reload
success

Check the configuration before restarting the service. 

[[email protected] ~]# haproxy -c -f /etc/haproxy/haproxy.cfg
Configuration file is valid

Check Out: Configure HaProxy Server Log In Rsyslog On CentOS 7

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here