HAProxy — Prerequisites
Prerequisites for monitoring HAProxy with HEAL.
Prerequisites to complete before adding this component in the HEAL Control Center.
Prerequisites for HAProxy Monitoring:
-
Navigate to the below directory:
/etc/haproxy/haproxy.cfg -
Access the
haproxy.cfgfile and check if the HAProxy listen stats is enabled (this allows the component agent to collect the necessary metrics).-
If the HAProxy listen stats is enabled, note the port number present under the listen stats section as below.For example:
bind:9797 # Bind the stats interface to port 9797 -
If the authentication is enabled, get the username & password present under the listen stats section as below.For example:
stats auth <username>:<password> # Authentication credentials (username:password) -
If the HAProxy stats interface is not enabled, add the following configuration under the listen stats section of your
haproxy.cfgfile:listen stats # Define a listen section called "stats" bind:<port> # Bind the stats interface to port stats enable # Enable the stats page stats hide-version # Hide the HAProxy version on the stats page stats realm Haproxy\ Statistics # Title text for the popup authentication window stats uri /haproxy_stats # URI path to access the stats page stats auth <username>:<password> # Authentication credentials (username:password)
-
-
Restart HAProxy.
See also: HAProxy (what HEAL monitors) · Setup & configuration guide