HAProxy is one of the most popular open-source load balancing software, which also offers high availability and proxy functionality. This module collects stats from HAProxy. It supports collection from using TCP sockets or HTTP with or without basic authentication.

Setup & Configuration

The HAProxy plugin is included with the Atatus Infra agent by default, please follow the below section to enable.

  1. Copy the HAProxy example configuration file.

    copy
    icon/buttons/copy
    cd /etc/atatus-infra-agent/conf.d/haproxy.d/
    sudo cp haproxy.yml.template haproxy.yml
    
  2. Update the file /etc/atatus-infra-agent/conf.d/haproxy.d/haproxy.yml with below configurations.

    copy
    icon/buttons/copy
    # Metrics section
    metrics:
    
          # Host Details
        - hosts: ["tcp://127.0.0.1:14567"]
    
          # Username of hosts Empty by default.
          #username: admin
    
          # Password of hosts Empty by default.
          #password: admin
    
  3. Restart the atatus infrastructure agent.

    copy
    icon/buttons/copy
    sudo service atatus-infra-agent restart
    

Metrics

Name Description Type
haproxy.stat.response.http.2xx HTTP responses with 2xx code. long
haproxy.stat.response.http.3xx HTTP responses with 3xx code. long
haproxy.stat.response.http.4xx HTTP responses with 4xx code. long
haproxy.info.bytes.out.rate Average bytes output rate. long
haproxy.stat.response.http.5xx HTTP responses with 5xx code. long
haproxy.stat.queue.limit Configured queue limit (maxqueue) for the server, or nothing if the value of maxqueue is 0 (meaning no limit). int