Skip to main content

Haproxy Receiver

Status Available in: contrib Maintainers: @atoulme, @MovieStoreGuy Source: opentelemetry-collector-contrib

Supported Telemetry

Metrics

Overview

Getting Started

Configuration

endpoint (required)

Path to the endpoint exposed by HAProxy for communications. It can be a local file socket or a HTTP URL.

Collection interval settings (optional)

The scraping collection interval can be configured. Default: 1 minute

Initial delay settings (optional)

defines how long this receiver waits before starting. Default: 1s

Example configuration

haproxy:
  endpoint: file:///var/run/haproxy.ipc
  collection_interval: 1m
  metrics:
    

Enabling metrics.

See documentation.md. You can enable or disable selective metrics. Example:
receivers:
  haproxy:
    endpoint: http://127.0.0.1:8080/stats
    metrics:
      haproxy.connection_rate:
        enabled: false
      haproxy.requests:
        enabled: true

Metrics

Metric NameDescriptionUnitTypeAttributes
❌ haproxy.activeNumber of active servers (backend) or server is active (server). Corresponds to HAProxy’s act metric.{servers}Gauge
❌ haproxy.backupNumber of backup servers (backend) or server is backup (server). Corresponds to HAProxy’s bck metric.{servers}Gauge
✅ haproxy.bytes.inputBytes in. Corresponds to HAProxy’s bin metric.byCounter
✅ haproxy.bytes.outputBytes out. Corresponds to HAProxy’s bout metric.byCounter
❌ haproxy.clients.canceledNumber of data transfers aborted by the client. Corresponds to HAProxy’s cli_abrt metric{cancellations}Counter
❌ haproxy.compression.bypassNumber of bytes that bypassed the HTTP compressor (CPU/BW limit). Corresponds to HAProxy’s comp_byp metric.byCounter
❌ haproxy.compression.countNumber of HTTP responses that were compressed. Corresponds to HAProxy’s comp_rsp metric.{responses}Counter
❌ haproxy.compression.inputNumber of HTTP response bytes fed to the compressor. Corresponds to HAProxy’s comp_in metric.byCounter
❌ haproxy.compression.outputNumber of HTTP response bytes emitted by the compressor. Corresponds to HAProxy’s comp_out metric.byCounter
❌ haproxy.connections.average_timeAverage connect time in ms over the 1024 last requests. Corresponds to HAProxy’s ctime metric.msGauge
✅ haproxy.connections.errorsNumber of requests that encountered an error trying to connect to a backend server. The backend stat is the sum of the stat. Corresponds to HAProxy’s econ metric{errors}Counter
✅ haproxy.connections.rateNumber of connections over the last elapsed second (frontend). Corresponds to HAProxy’s conn_rate metric.{connections}Gauge
✅ haproxy.connections.retriesNumber of times a connection to a server was retried. Corresponds to HAProxy’s wretr metric.{retries}Counter
❌ haproxy.connections.totalCumulative number of connections (frontend). Corresponds to HAProxy’s conn_tot metric.{connections}Counter
❌ haproxy.downtimeTotal downtime (in seconds). The value for the backend is the downtime for the whole backend, not the sum of the server downtime. Corresponds to HAProxy’s downtime metricsCounter
❌ haproxy.failed_checksNumber of failed checks. (Only counts checks failed when the server is up). Corresponds to HAProxy’s chkfail metric.{checks}Counter
❌ haproxy.requests.average_timeAverage queue time in ms over the 1024 last requests. Corresponds to HAProxy’s qtime metric.msGauge
✅ haproxy.requests.deniedRequests denied because of security concerns. Corresponds to HAProxy’s dreq metric{requests}Counter
✅ haproxy.requests.errorsCumulative number of request errors. Corresponds to HAProxy’s ereq metric.{errors}Counter
✅ haproxy.requests.queuedCurrent queued requests. For the backend this reports the number queued without a server assigned. Corresponds to HAProxy’s qcur metric.{requests}Counter
✅ haproxy.requests.rateHTTP requests per second over last elapsed second. Corresponds to HAProxy’s req_rate metric.{requests}Gauge
✅ haproxy.requests.redispatchedNumber of times a request was redispatched to another server. Corresponds to HAProxy’s wredis metric.{requests}Counter
✅ haproxy.requests.totalTotal number of HTTP requests received. Corresponds to HAProxy’s req_tot, hrsp_1xx, hrsp_2xx, hrsp_3xx, hrsp_4xx, hrsp_5xx and hrsp_other metrics.{requests}Counterstatus_code
❌ haproxy.responses.average_timeAverage response time in ms over the 1024 last requests. Corresponds to HAProxy’s rtime metric.msGauge
✅ haproxy.responses.deniedResponses denied because of security concerns. Corresponds to HAProxy’s dresp metric{responses}Counter
✅ haproxy.responses.errorsCumulative number of response errors. Corresponds to HAProxy’s eresp metric, srv_abrt will be counted here also.{errors}Counter
✅ haproxy.server_selected.totalNumber of times a server was selected, either for new sessions or when re-dispatching. Corresponds to HAProxy’s lbtot metric.{selections}Counter
✅ haproxy.sessions.averageAverage total session time in ms over the last 1024 requests. Corresponds to HAProxy’s ttime metric.msGauge
✅ haproxy.sessions.countCurrent sessions. Corresponds to HAProxy’s scur metric.{sessions}Gauge
❌ haproxy.sessions.limitConfigured session limit. Corresponds to HAProxy’s slim metric.{sessions}Gauge
✅ haproxy.sessions.rateNumber of sessions per second over last elapsed second. Corresponds to HAProxy’s rate metric.{sessions}Gauge
❌ haproxy.sessions.totalCumulative number of sessions. Corresponds to HAProxy’s stot metric.{sessions}Counter
❌ haproxy.weightTotal effective weight (backend) or effective weight (server). Corresponds to HAProxy’s weight metric.1Gauge

Attributes

Attribute NameDescriptionTypeValues
status_codeStatus code category, 1xx, 2xx, 3xx, 4xx, 5xx or otherstring1xx, 2xx, 3xx, 4xx, 5xx, other

Resource Attributes

Attribute NameDescriptionTypeEnabled
haproxy.addraddress:port or “unix”. IPv6 has brackets around the address.string✅
haproxy.proxy_nameProxy namestring✅
haproxy.server.stateServer status (UP, DOWN, NOLB, MAINT, no check, etc.). Corresponds to HAProxy’s status field.string❌
haproxy.service_nameService name (FRONTEND for frontend, BACKEND for backend, any name for server/listener)string✅

Last generated: 2026-04-13