HAProxy — Prerequisites

Prerequisites for monitoring HAProxy with HEAL.

1 min read Updated SS

Prerequisites to complete before adding this component in the HEAL Control Center.

Prerequisites for HAProxy Monitoring:

  1. Navigate to the below directory:

    /etc/haproxy/haproxy.cfg
    
  2. Access the haproxy.cfg file and check if the HAProxy listen stats is enabled (this allows the component agent to collect the necessary metrics).

    1. 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
      
    2. 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)
      
    3. If the HAProxy stats interface is not enabled, add the following configuration under the listen stats section of your haproxy.cfg file:

      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)
      
  3. Restart HAProxy.


See also: HAProxy (what HEAL monitors) · Setup & configuration guide