How to merge multi-process HAProxy statistics using GNU Awk

Merge multi-process HAProxy statistics using GNU Awk. This is a duct tape solution as you should definitely use Lua.

Inspect operating system version.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

Install HAProxy.

$ sudo apt install haproxy

Create /etc/haproxy/update_statistics.sh shell script.

#!/bin/bash
# Combine HAProxy statistics from multiple sources
#
# Data output:
#   pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,lbtot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli_abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,agent_status,agent_code,agent_duration,check_desc,agent_desc,check_rise,check_fall,check_health,agent_rise,agent_fall,agent_health,addr,cookie,mode,algo,conn_rate,conn_rate_max,conn_tot,intercepted,dcon,dses,
#    [...]
#

# Create temporary file
temp_file=$(mktemp)

# Define basic parameters
statistics_proto="http"
statistics_host="127.0.0.1"
statistics_ports="$(seq 7001 7004)"
statistics_path="/statistics;csv"
statistics_user="stats"
statistics_pass="stats"

# Calculate number of elements
statistics_elements="$(echo $statistics_ports | wc -w)"

# Combine statistics into a single file
for statistics_port in $statistics_ports; do 
  curl --silent --user "${statistics_user}:${statistics_pass}" "${statistics_proto}://${statistics_host}:${statistics_port}${statistics_path}" | tee -a $temp_file >/dev/null; 
done 

# Execute GNU Awk to combine values
gawk -v ELEMENTS=$statistics_elements -F, '
  BEGIN {
    # Shift columns on each line (pxname and svname are used as index)
    shift = 2
    # Define fields array
    split("qcur qmax scur smax slim stot bin bout dreq dresp ereq econ eresp wretr wredis status weight act bck chkfail chkdown lastchg downtime qlimit pid iid sid throttle lbtot tracked type rate rate_lim rate_max check_status check_code check_duration hrsp_1xx hrsp_2xx hrsp_3xx hrsp_4xx hrsp_5xx hrsp_other hanafail req_rate req_rate_max req_tot cli_abrt srv_abrt comp_in comp_out comp_byp comp_rsp lastsess last_chk last_agt qtime ctime rtime ttime agent_status agent_code agent_duration check_desc agent_desc check_rise check_fall check_health agent_rise agent_fall agent_health addr cookie mode algo conn_rate conn_rate_max conn_tot intercepted dcon dses", fields, " ")
  }
  # Print header
  NR==1 {print;next}

  # Skip any other header
  /^#/ {next}

  # Parse data
  {
    if(!statistics[$1][$2]["exists"]) {  # First occurence
      statistics[$1][$2]["exists"] = 1
      for (field = 1;field <= length(fields); field++) {
        statistics[$1][$2][fields[field]] = $(field + shift)
      }
    } else { # Second or subsequent occurrence 
      for (field = 1;field <= length(fields); field++) {
        #print "u " field " = " fields[field]
        switch(fields[field]) {
        # sum fields
        case "qcur":
        case "qmax":
        case "scur":
        case "smax":
        case "slim":
        case "stot":
        case "bin":
        case "bout":
        case "dreq":
        case "dresp":
        case "ereq":
        case "econ":
        case "eresp":
        case "wretr":
        case "wredis":
        case "chkfail":
        case "chkdown":
        case "lbtot":
        case "hrsp_1xx":
        case "hrsp_2xx":
        case "hrsp_3xx":
        case "hrsp_4xx":
        case "hrsp_5xx":
        case "hrsp_other":
        case "req_rate":
        case "req_rate_max":
        case "req_tot":
        case "cli_abrt":
        case "srv_abrt":
        case "comp_in":
        case "comp_out":
        case "comp_byp":
        case "comp_rsp":
        case "rate":
        case "rate_lim":
        case "rate_max":
        case "intercepted":
        case "dcon":
        case "dses":
          statistics[$1][$2][fields[field]] = statistics[$1][$2][fields[field]] + $(field + shift)
          break
        # Concatenate strings
        case "status":
        case "pid":
        case "check_status":
        case "check_code":
        case "check_desc":
        case "agent_desc":
        case "check_duration":
        case "hanafail":
        case "last_chk":
        case "last_agt":
        case "tracked":
        case "lastsess":
        case "qlimit":
        case "agent_status":
        case "agent_code":
        case "agent_health":
        case "agent_duration":
        case "check_health":
        case "conn_rate":
        case "conn_rate_max":
        case "conn_tot":
          if(length($(field + shift)) > 0)
            statistics[$1][$2][fields[field]] = statistics[$1][$2][fields[field]] "/" $(field + shift)
          break
        # Sum for average
        case "throttle":
        case "qtime":
        case "ctime":
        case "rtime":
        case "ttime":
          statistics[$1][$2][fields[field]] = statistics[$1][$2][fields[field]] + $(field + shift)
          break
        # Use first value
        case "weight":
        case "act":
        case "bck":
        case "lastchg":
        case "downtime":
        case "type":
        case "addr":
        case "algo":
        case "sid":
        case "iid":
        case "check_rise":
        case "check_fall":
        case "agent_rise":
        case "agent_fall":
        case "cookie":
        case "mode":
          break
        default:
          print "Notice: " fields[field]  " not defined"
          break
        }
      }
    }  
  }

  END {
    # Define fields to calculate average value 
    split("time ctime rtime ttime throttle",average," ") 

    # Calculate average values
    for (pxname in statistics) {
      for (svname in statistics[pxname])
        for(field in average)
          if(length(statistics[pxname][svname][average[field]]) > 0)
            statistics[pxname][svname][average[field]] = statistics[pxname][svname][average[field]] / ELEMENTS
    }

    # Display values
    for (pxname in statistics)
      for (svname in statistics[pxname]) {
        printf pxname "," svname "," 
        for (field = 1;field <= length(fields); field++) {
          if(field < length(fields)) 
            printf statistics[pxname][svname][fields[field]] ","
	        else
            printf statistics[pxname][svname][fields[field]] ",\n"
        }
      }
  }
' $temp_file

# Delete temporary file
rm $temp_file

Ensure that executable bit is set.

$ chmod +x /etc/haproxy/update_statistics.sh

Create /etc/haproxy/statistics.csv file and set proper permissions.

$ sudo touch /etc/haproxy/statistics.csv
$ sudo chown haproxy /etc/haproxy/statistics.csv

Execute above-mentioned shell script every minute using cron.

$ sudo crontab -u haproxy -l
# Edit this file to introduce tasks to be run by cron.
# 
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
# 
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').
# 
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
# 
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
# 
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
# 
# For more information see the manual pages of crontab(5) and cron(8)
# 
# m h  dom mon dow   command
* * * * * /etc/haproxy/update_statistics.sh > /etc/haproxy/statistics.csv

Create HAProxy configuration.

global
  log /dev/log  local0
  log /dev/log  local1 notice
  chroot /var/lib/haproxy
  stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
  stats timeout 30s
  user haproxy
  group haproxy
  daemon

  # Default SSL material locations
  ca-base /etc/ssl/certs
  crt-base /etc/ssl/private

  # Default ciphers to use on SSL-enabled listening sockets.
  # For more information, see ciphers(1SSL). This list is from:
  #  https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
  # An alternative list with additional directives can be obtained from
  #  https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=haproxy
  ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
  ssl-default-bind-options no-sslv3

  nbproc 4
  cpu-map auto:1-4 0-3

defaults
  log global
  mode  http
  option  httplog
  option  dontlognull
  timeout connect 5000
  timeout client  50000
  timeout server  50000
  errorfile 400 /etc/haproxy/errors/400.http
  errorfile 403 /etc/haproxy/errors/403.http
  errorfile 408 /etc/haproxy/errors/408.http
  errorfile 500 /etc/haproxy/errors/500.http
  errorfile 502 /etc/haproxy/errors/502.http
  errorfile 503 /etc/haproxy/errors/503.http
  errorfile 504 /etc/haproxy/errors/504.http

userlist statistics-auth-list
  user stats insecure-password stats

frontend sample-frontend
  bind :80

  mode http
  default_backend sample-backend

backend sample-backend
  option tcp-check
  server backend-server-1 192.168.88.1:80 check
  server backend-server-2 192.168.88.2:80 check

listen statistics-1
  bind  127.0.0.1:7001
  mode  http
  bind-process 1
  stats enable
  stats realm Statistics
  stats uri /statistics
  stats show-legends

  # stats auth stats:stats
  acl statistics-auth http_auth(statistics-auth-list)
  http-request auth realm statistics unless statistics-auth

listen statistics-2
  bind  127.0.0.1:7002
  mode  http
  bind-process 2
  stats enable
  stats realm Statistics
  stats uri /statistics
  stats show-legends

  # stats auth stats:stats
  acl statistics-auth http_auth(statistics-auth-list)
  http-request auth realm statistics unless statistics-auth

listen statistics-3
  bind  127.0.0.1:7003
  mode  http
  bind-process 3
  stats enable
  stats realm Statistics
  stats uri /statistics
  stats show-legends

  # stats auth stats:stats
  acl statistics-auth http_auth(statistics-auth-list)
  http-request auth realm statistics unless statistics-auth

listen statistics-4
  bind  127.0.0.1:7004
  mode  http
  bind-process 4
  stats enable
  stats realm Statistics
  stats uri /statistics
  stats show-legends

  # stats auth stats:stats
  acl statistics-auth http_auth(statistics-auth-list)
  http-request auth realm statistics unless statistics-auth

#listen statistics-0
#  bind  127.0.0.1:7000
#  mode  http
#
#  acl statistics-auth http_auth(statistics-auth-list)
#  http-request auth realm statistics unless statistics-auth
#
#  monitor-uri /statistics;csv
#  errorfile 200 /etc/haproxy/statistics.csv

Reload HAProxy service.

$ sudo systemctl reload haproxy

Install nginx web-server.

$ sudo apt install nginx

Disable default configuration.

$ sudo unlink /etc/nginx/sites-enabled/default

Create user list for basic auth.

$ echo "stats:$(echo stats | openssl passwd -apr1 -stdin)" | sudo tee /etc/nginx/snippets/stats.htpasswd

Create /etc/nginx/sites-available/statistics configuration file.

server {
  listen 127.0.0.1:7000;

  root /etc/haproxy;

  location "/statistics;csv;norefresh" {
    auth_basic "HAProxy statistics";
    auth_basic_user_file /etc/nginx/snippets/stats.htpasswd;

    try_files /statistics.csv =404;
  }

  location / {
    deny all;
  }
}

Enable this specific configuration.

$ sudo ln -s /etc/nginx/sites-available/statistics /etc/nginx/sites-enabled/

Reload nginx service.

$ sudo systemctl reload nginx

Verify configuration.

$ for p in $(seq 7000 7004); do echo; echo "Port ${p}"; curl -s -u stats:stats "http://127.0.0.1:${p}/statistics;csv;norefresh" | sort -t, -k 1,2; done
                                                                                                                                                                          [24/1887]
Port 7000                                                                                                                                                                          
# pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,l
btot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli_
abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,agent_status,agent_code,agent_duration,check_desc,agent_desc,check_rise,check_f
all,check_health,agent_rise,agent_fall,agent_health,addr,cookie,mode,algo,conn_rate,conn_rate_max,conn_tot,intercepted,dcon,dses,                                                  
sample-backend,BACKEND,0,0,0,11,800,18,5788,92863,0,0,0,0,0,0,0,UP/UP/UP/UP,1,1,0,0,0,1549,0,,1/2/3/4,3,0,0,18,,1,0,0,13,,,,0,17,1,0,0,0,,0,0,18,1,0,0,0,0,0,1384/370/370/1384,,,0,
1,1,2.25,,,,,,,,,,,,,,http,roundrobin,,,,0,0,0,                                                                                                                                    
sample-backend,backend-server-1,0,0,0,11,0,18,5788,92863,0,0,0,0,0,0,0,UP/UP/UP/UP,1,1,0,0,0,1549,0,,1/2/3/4,3,1,0,18,,2,0,0,13,L4OK/L4OK/L4OK/L4OK,,1/11/1/5,0,17,1,0,0,0,,0,0,0,1
,0,0,0,0,0,1384/370/370/1384,,,0,1,1,2.25,,,,Layer4 check passed/Layer4 check passed/Layer4 check passed/Layer4 check passed,,2,3,4/4/4/4,,,,192.168.88.1:80,,http,,,,,0,0,0,      
sample-backend,backend-server-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,DOWN/DOWN/DOWN/DOWN,1,1,0,4,4,1546,1546,,1/2/3/4,3,2,0,0,,2,0,0,0,L4CON/L4CON/L4CON/L4CON,,1071/1071/1072/1069,0,0,0,
0,0,0,,0,0,0,0,0,0,0,0,0,-1/-1/-1/-1,No route to host at initial connection step of tcp-check/No route to host at initial connection step of tcp-check/No route to host at initial 
connection step of tcp-check/No route to host at initial connection step of tcp-check,,0,0,0,0,,,,Layer4 connection problem/Layer4 connection problem/Layer4 connection problem/Lay
er4 connection problem,,2,3,0/0/0/0,,,,192.168.88.2:80,,http,,,,,0,0,0,                                                                                                            
sample-frontend,FRONTEND,0,0,0,11,8000,12,5788,92863,0,0,0,0,0,0,0,OPEN/OPEN/OPEN/OPEN,,,,0,0,,,,1/2/3/4,2,0,0,0,,0,0,0,10,,,,0,17,1,0,0,0,,0,13,18,0,0,0,0,0,0,,,,0,0,0,0,,,,,,,,,
,,,,,http,,0/0/0/0,1/1/4/4,1/1/6/4,0,0,0,                                                                                                                                          
statistics-1,BACKEND,0,0,0,0,200,0,4474,65752,0,0,,0,0,0,0,UP,0,0,0,,0,1549,,,1,4,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,0,0,0,0,0,0,0,0,,,0,0,0,0,,,,,,,,,,,,,,http,roundrobin,,,,,,,     
statistics-1,FRONTEND,,,1,1,2000,35,4474,65752,0,0,0,,,,,OPEN,,,,,,,,,1,4,0,,,,0,1,0,2,,,,0,34,0,0,0,0,,1,2,35,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,http,,1,2,35,35,0,0,                  
statistics-2,BACKEND,0,0,0,0,200,0,4474,65400,0,0,,0,0,0,0,UP,0,0,0,,0,1549,,,2,5,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,0,0,0,0,0,0,0,0,,,0,0,0,0,,,,,,,,,,,,,,http,roundrobin,,,,,,,     
statistics-2,FRONTEND,,,1,1,2000,35,4474,65400,0,0,0,,,,,OPEN,,,,,,,,,2,5,0,,,,0,1,0,2,,,,0,34,0,0,0,0,,1,2,35,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,http,,1,2,35,35,0,0,                  
statistics-3,BACKEND,0,0,0,0,200,0,4474,65898,0,0,,0,0,0,0,UP,0,0,0,,0,1549,,,3,6,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,0,0,0,0,0,0,0,0,,,0,0,0,0,,,,,,,,,,,,,,http,roundrobin,,,,,,,     
statistics-3,FRONTEND,,,1,1,2000,35,4474,65898,0,0,0,,,,,OPEN,,,,,,,,,3,6,0,,,,0,1,0,2,,,,0,34,0,0,0,0,,1,2,35,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,http,,1,2,35,35,0,0,                  
statistics-4,BACKEND,0,0,0,0,200,0,4474,65910,0,0,,0,0,0,0,UP,0,0,0,,0,1549,,,4,7,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,0,0,0,0,0,0,0,0,,,0,0,0,0,,,,,,,,,,,,,,http,roundrobin,,,,,,,     
statistics-4,FRONTEND,,,1,1,2000,35,4474,65910,0,0,0,,,,,OPEN,,,,,,,,,4,7,0,,,,0,1,0,2,,,,0,34,0,0,0,0,,1,2,35,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,http,,1,2,35,35,0,0,                  
                                                                                                                                                                                   
Port 7001
# pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,$btot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli$abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,agent_status,agent_code,agent_duration,check_desc,agent_desc,check_rise,check_$all,check_health,agent_rise,agent_fall,agent_health,addr,cookie,mode,algo,conn_rate,conn_rate_max,conn_tot,intercepted,dcon,dses,
sample-backend,BACKEND,0,0,0,1,200,1,301,6602,0,0,,0,0,0,0,UP,1,1,0,,0,1593,0,,1,3,0,,1,,1,0,,1,,,,0,1,0,0,0,0,,,,1,0,0,0,0,0,0,1428,,,0,1,1,1,,,,,,,,,,,,,,http,roundrobin,,,,,,,
sample-backend,backend-server-1,0,0,0,1,,1,301,6602,,0,,0,0,0,0,UP,1,1,0,0,0,1593,0,,1,3,1,,1,,2,0,,1,L4OK,,1,0,1,0,0,0,0,,,,,0,0,,,,,1428,,,0,1,1,1,,,,Layer4 check passed,,2,3,4$,,,192.168.88.1:80,,http,,,,,,,,
sample-backend,backend-server-2,0,0,0,0,,0,0,0,,0,,0,0,0,0,DOWN,1,1,0,1,1,1590,1590,,1,3,2,,0,,2,0,,0,L4CON,,1070,0,0,0,0,0,0,,,,,0,0,,,,,-1,No route to host at initial connectio$ step of tcp-check,,0,0,0,0,,,,Layer4 connection problem,,2,3,0,,,,192.168.88.2:80,,http,,,,,,,,
sample-frontend,FRONTEND,,,0,1,2000,1,301,6602,0,0,0,,,,,OPEN,,,,,,,,,1,2,0,,,,0,0,0,1,,,,0,1,0,0,0,0,,0,1,1,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,http,,0,1,1,0,0,0,
statistics-1,BACKEND,0,0,0,0,200,0,4605,67713,0,0,,0,0,0,0,UP,0,0,0,,0,1593,,,1,4,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,0,0,0,0,0,0,0,0,,,0,0,0,0,,,,,,,,,,,,,,http,roundrobin,,,,,,,
statistics-1,FRONTEND,,,1,1,2000,36,4605,67713,0,0,0,,,,,OPEN,,,,,,,,,1,4,0,,,,0,1,0,2,,,,0,35,0,0,0,0,,1,2,36,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,http,,1,2,36,36,0,0,

Port 7002
# pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,$btot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli$abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,agent_status,agent_code,agent_duration,check_desc,agent_desc,check_rise,check_$all,check_health,agent_rise,agent_fall,agent_health,addr,cookie,mode,algo,conn_rate,conn_rate_max,conn_tot,intercepted,dcon,dses,
sample-backend,BACKEND,0,0,0,1,200,1,326,7798,0,0,,0,0,0,0,UP,1,1,0,,0,1593,0,,2,3,0,,1,,1,0,,1,,,,0,1,0,0,0,0,,,,1,0,0,0,0,0,0,414,,,0,1,1,1,,,,,,,,,,,,,,http,roundrobin,,,,,,,
sample-backend,backend-server-1,0,0,0,1,,1,326,7798,,0,,0,0,0,0,UP,1,1,0,0,0,1593,0,,2,3,1,,1,,2,0,,1,L4OK,,146,0,1,0,0,0,0,,,,,0,0,,,,,414,,,0,1,1,1,,,,Layer4 check passed,,2,3,$,,,,192.168.88.1:80,,http,,,,,,,,
sample-backend,backend-server-2,0,0,0,0,,0,0,0,,0,,0,0,0,0,DOWN,1,1,0,1,1,1590,1590,,2,3,2,,0,,2,0,,0,L4CON,,1071,0,0,0,0,0,0,,,,,0,0,,,,,-1,No route to host at initial connectio$ step of tcp-check,,0,0,0,0,,,,Layer4 connection problem,,2,3,0,,,,192.168.88.2:80,,http,,,,,,,,
sample-frontend,FRONTEND,,,0,1,2000,1,326,7798,0,0,0,,,,,OPEN,,,,,,,,,2,2,0,,,,0,0,0,1,,,,0,1,0,0,0,0,,0,1,1,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,http,,0,1,1,0,0,0,
statistics-2,BACKEND,0,0,0,0,200,0,4605,67360,0,0,,0,0,0,0,UP,0,0,0,,0,1593,,,2,5,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,0,0,0,0,0,0,0,0,,,0,0,0,0,,,,,,,,,,,,,,http,roundrobin,,,,,,,
statistics-2,FRONTEND,,,1,1,2000,36,4605,67360,0,0,0,,,,,OPEN,,,,,,,,,2,5,0,,,,0,1,0,2,,,,0,35,0,0,0,0,,1,2,36,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,http,,1,2,36,36,0,0,

Port 7003
# pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,$btot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli$abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,agent_status,agent_code,agent_duration,check_desc,agent_desc,check_rise,check_$all,check_health,agent_rise,agent_fall,agent_health,addr,cookie,mode,algo,conn_rate,conn_rate_max,conn_tot,intercepted,dcon,dses,
sample-backend,BACKEND,0,0,0,5,200,11,3695,49402,0,0,,0,0,0,0,UP,1,1,0,,0,1593,0,,3,3,0,,11,,1,0,,6,,,,0,10,1,0,0,0,,,,11,0,0,0,0,0,0,414,,,0,1,1,6,,,,,,,,,,,,,,http,roundrobin,,$,,,,
sample-backend,backend-server-1,0,0,0,5,,11,3695,49402,,0,,0,0,0,0,UP,1,1,0,0,0,1593,0,,3,3,1,,11,,2,0,,6,L4OK,,0,0,10,1,0,0,0,,,,,0,0,,,,,414,,,0,1,1,6,,,,Layer4 check passed,,2$3,4,,,,192.168.88.1:80,,http,,,,,,,,
sample-backend,backend-server-2,0,0,0,0,,0,0,0,,0,,0,0,0,0,DOWN,1,1,0,1,1,1590,1590,,3,3,2,,0,,2,0,,0,L4CON,,1070,0,0,0,0,0,0,,,,,0,0,,,,,-1,No route to host at initial connection step of tcp-check,,0,0,0,0,,,,Layer4 connection problem,,2,3,0,,,,192.168.88.2:80,,http,,,,,,,,
sample-frontend,FRONTEND,,,0,5,2000,6,3695,49402,0,0,0,,,,,OPEN,,,,,,,,,3,2,0,,,,0,0,0,4,,,,0,10,1,0,0,0,,0,6,11,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,http,,0,4,6,0,0,0,
statistics-3,BACKEND,0,0,0,0,200,0,4605,67872,0,0,,0,0,0,0,UP,0,0,0,,0,1593,,,3,6,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,0,0,0,0,0,0,0,0,,,0,0,0,0,,,,,,,,,,,,,,http,roundrobin,,,,,,,
statistics-3,FRONTEND,,,1,1,2000,36,4605,67872,0,0,0,,,,,OPEN,,,,,,,,,3,6,0,,,,0,1,0,2,,,,0,35,0,0,0,0,,1,2,36,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,http,,1,2,36,36,0,0,

Port 7004
# pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,l
btot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli_
abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,agent_status,agent_code,agent_duration,check_desc,agent_desc,check_rise,check_f
all,check_health,agent_rise,agent_fall,agent_health,addr,cookie,mode,algo,conn_rate,conn_rate_max,conn_tot,intercepted,dcon,dses,
sample-backend,BACKEND,0,0,0,4,200,5,1466,29061,0,0,,0,0,0,0,UP,1,1,0,,0,1593,0,,4,3,0,,5,,1,0,,5,,,,0,5,0,0,0,0,,,,5,1,0,0,0,0,0,1428,,,0,1,1,1,,,,,,,,,,,,,,http,roundrobin,,,,,,
,
sample-backend,backend-server-1,0,0,0,4,,5,1466,29061,,0,,0,0,0,0,UP,1,1,0,0,0,1593,0,,4,3,1,,5,,2,0,,5,L4OK,,146,0,5,0,0,0,0,,,,,1,0,,,,,1428,,,0,1,1,1,,,,Layer4 check passed,,2,
3,4,,,,192.168.88.1:80,,http,,,,,,,,
sample-backend,backend-server-2,0,0,0,0,,0,0,0,,0,,0,0,0,0,DOWN,1,1,0,1,1,1590,1590,,4,3,2,,0,,2,0,,0,L4CON,,1071,0,0,0,0,0,0,,,,,0,0,,,,,-1,No route to host at initial connection
 step of tcp-check,,0,0,0,0,,,,Layer4 connection problem,,2,3,0,,,,192.168.88.2:80,,http,,,,,,,,
sample-frontend,FRONTEND,,,0,4,2000,4,1466,29061,0,0,0,,,,,OPEN,,,,,,,,,4,2,0,,,,0,0,0,4,,,,0,5,0,0,0,0,,0,5,5,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,http,,0,4,4,0,0,0,
statistics-4,BACKEND,0,0,0,0,200,0,4605,67877,0,0,,0,0,0,0,UP,0,0,0,,0,1593,,,4,7,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,0,0,0,0,0,0,0,0,,,0,0,0,0,,,,,,,,,,,,,,http,roundrobin,,,,,,,
statistics-4,FRONTEND,,,1,1,2000,36,4605,67877,0,0,0,,,,,OPEN,,,,,,,,,4,7,0,,,,0,1,0,2,,,,0,35,0,0,0,0,,1,2,36,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,http,,1,2,36,36,0,0,

Notice, calculated values on port 7000 are slightly delayed up to 1 minute.