All Integrations
Web Servershaproxy.cfg stats + Prometheus

HAProxy Integration

Monitor frontend and backend sessions, queue depths, server health, and SSL metrics across your HAProxy instances with TigerOps. Alerts fire before connection exhaustion impacts users.

Setup

How It Works

01

Enable the Stats Socket

Add the stats socket line to your haproxy.cfg global section. This exposes the HAProxy stats Unix socket that the TigerOps exporter uses to collect real-time metrics.

02

Enable Prometheus Endpoint

Add the prometheus-exporter frontend to your haproxy.cfg. HAProxy 2.0+ includes a built-in Prometheus exporter — no separate binary needed.

03

Configure TigerOps Scrape

Point TigerOps at your HAProxy Prometheus endpoint. All frontend, backend, and server-level metrics are automatically labeled and begin flowing in seconds.

04

Set Session and Error Alerts

Define alerts for session limit utilization, backend server downtime, queue overflow, and 5xx error rates. TigerOps correlates these with upstream application metrics.

Capabilities

What You Get Out of the Box

Frontend Session Metrics

Current and max sessions, session rate, connection rate, requests per second, and byte in/out rates per frontend — with configurable session limit utilization alerts.

Backend & Server Health

Per-backend and per-server health check status, down time, active/backup server counts, and weight changes. Instant alerts when servers transition to DOWN state.

Queue Depth Monitoring

Backend queue current depth, max queue depth, and queue time percentiles. Queue growth spikes trigger early warning alerts before timeouts occur.

Error Rate Tracking

HTTP 4xx and 5xx error rates per frontend and backend, connection refusal counts, and request error rates with breakdown by error type.

Stick Table Metrics

Track stick table size, entry counts, and rate-limiting counters per frontend. Identify IP-based attack patterns from stick table saturation.

SSL/TLS Metrics

SSL handshake rates, session reuse ratios, certificate expiry tracking, and TLS error counts. Automated alerts before certificate expiration.

Configuration

haproxy.cfg Stats Socket + Prometheus

Enable both the stats socket and the built-in Prometheus exporter frontend.

haproxy.cfg
# haproxy.cfg — enable stats socket and Prometheus exporter

global
    log /dev/log local0
    maxconn 50000

    # Stats socket for legacy scraping (HAProxy < 2.0)
    stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
    stats timeout 30s

defaults
    mode    http
    timeout connect 5s
    timeout client  30s
    timeout server  30s
    option  httplog

# Built-in Prometheus exporter (HAProxy 2.0+)
frontend prometheus
    bind *:8404
    http-request use-service prometheus-exporter if { path /metrics }
    no log

# Example frontend
frontend http_in
    bind *:80
    default_backend app_servers

# Example backend
backend app_servers
    balance roundrobin
    option httpchk GET /health
    server app1 10.0.0.1:8080 check
    server app2 10.0.0.2:8080 check
    server app3 10.0.0.3:8080 check backup

# TigerOps scrape config:
# scrape_configs:
#   - job_name: haproxy
#     static_configs:
#       - targets: ['haproxy.example.com:8404']
#         labels:
#           cluster: prod-lb
# remote_write:
#   - url: https://ingest.atatus.net/api/v1/write
#     bearer_token: "${TIGEROPS_API_KEY}"
FAQ

Common Questions

Which HAProxy versions does TigerOps support?

TigerOps supports HAProxy 1.8 and later via the stats socket, and HAProxy 2.0+ via the built-in Prometheus exporter. The Prometheus endpoint is recommended as it provides richer metric labels and requires no additional binary.

Do I need to install a separate exporter binary?

Not for HAProxy 2.0+. The built-in prometheus-exporter frontend in haproxy.cfg exposes metrics natively. For older versions, TigerOps provides a lightweight haproxy-exporter that reads the stats socket.

Can TigerOps alert when a backend server goes DOWN?

Yes. TigerOps watches the haproxy_server_status metric and fires an alert the moment a server transitions from UP to DOWN. The alert includes the backend name, server name, and the last health check output.

How do I monitor HAProxy across multiple nodes in active-passive mode?

Deploy the TigerOps scraper on each HAProxy node and tag metrics with the node hostname. TigerOps provides multi-node aggregate views and separate per-node dashboards. VRRP failover events are annotated automatically.

Can TigerOps detect connection exhaustion before it becomes an outage?

Yes. TigerOps computes session utilization as a percentage of the maxconn limit and fires a warning at configurable thresholds (default: 80% and 95%). This gives you time to act before new connections are refused.

Get Started

Full HAProxy Visibility in Under 5 Minutes

Session monitoring, server health tracking, and proactive capacity alerts for HAProxy.