HA Proxy Metrics

HA Proxy exposes metrics at /metrics on port 1042. These metrics describe the proxy process, incoming frontend traffic, backend traffic, individual servers and DNS resolvers.

Labels and states

Frontend and backend series use proxy to identify the configured frontend or backend. Server series also have a server label. DNS series use resolver and nameserver.

Status metrics use a state label. Frontend and backend status values are UP and DOWN. Server states include UP, DOWN, MAINT, DRAIN, and NOLB. A status indicator is 1 for the current state and 0 for other states. Backend status aggregates count servers in each state.

The code label on HTTP response metrics groups responses as 1xx, 2xx, 3xx, 4xx, 5xx, or other. Health-check result labels identify outcomes such as L4OK, L4TOUT, L6OK, L7OK, or L7STS.

Process

Metric Type Unit Meaning

haproxy_process_nbthread

gauge

threads

Worker threads configured.

haproxy_process_nbproc

gauge

processes

Legacy worker-process count, fixed at 1.

haproxy_process_relative_process_id

gauge

identifier

Legacy worker number, fixed at 1.

haproxy_process_uptime_seconds

gauge

seconds

Time since this worker started.

haproxy_process_start_time_seconds

gauge

Unix seconds

Worker start timestamp.

haproxy_process_max_memory_bytes

gauge

bytes

Configured worker memory ceiling.

haproxy_process_pool_allocated_bytes

gauge

bytes

Memory reserved by HAProxy pools.

haproxy_process_pool_used_bytes

gauge

bytes

Pool memory currently occupied.

haproxy_process_pool_failures_total

counter

allocations

Failed memory-pool allocations.

haproxy_process_max_fds

gauge

descriptors

Worker file-descriptor ceiling.

haproxy_process_max_sockets

gauge

sockets

Worker socket ceiling.

haproxy_process_max_connections

gauge

connections

Effective worker connection ceiling.

haproxy_process_hard_max_connections

gauge

connections

Resource-imposed connection ceiling.

haproxy_process_current_connections

gauge

connections

Open worker connections.

haproxy_process_connections_total

counter

connections

Accepted connections since worker start.

haproxy_process_requests_total

counter

requests

Requests handled since worker start.

haproxy_process_max_ssl_connections

gauge

TLS endpoints

TLS endpoint ceiling, 0 means unlimited.

haproxy_process_current_ssl_connections

gauge

TLS endpoints

Open frontend and backend TLS endpoints.

haproxy_process_ssl_connections_total

counter

TLS endpoints

TLS endpoints created since worker start.

haproxy_process_max_pipes

gauge

pipes

Splice-pipe ceiling, 0 means unlimited.

haproxy_process_pipes_used_total

counter

pipes

Pipes currently occupied. This value is a current count.

haproxy_process_pipes_free_total

counter

pipes

Allocated pipes currently available. This value is a current count.

haproxy_process_current_connection_rate

gauge

connections/second

Recent frontend connection arrival rate.

haproxy_process_limit_connection_rate

gauge

connections/second

Configured connection-rate ceiling.

haproxy_process_max_connection_rate

gauge

connections/second

Highest connection arrival rate recorded.

haproxy_process_current_session_rate

gauge

sessions/second

Recent session creation rate.

haproxy_process_limit_session_rate

gauge

sessions/second

Configured session-rate ceiling.

haproxy_process_max_session_rate

gauge

sessions/second

Highest session creation rate recorded.

haproxy_process_current_ssl_rate

gauge

connections/second

Recent TLS connection creation rate.

haproxy_process_limit_ssl_rate

gauge

connections/second

Configured TLS creation-rate ceiling.

haproxy_process_max_ssl_rate

gauge

connections/second

Highest TLS connection creation rate recorded.

haproxy_process_current_frontend_ssl_key_rate

gauge

keys/second

Recent frontend TLS key creation rate.

haproxy_process_max_frontend_ssl_key_rate

gauge

keys/second

Highest frontend TLS key creation rate recorded.

haproxy_process_frontend_ssl_reuse

gauge

percent

Frontend TLS connections that avoided a new key.

haproxy_process_current_backend_ssl_key_rate

gauge

keys/second

Recent backend TLS key creation rate.

haproxy_process_max_backend_ssl_key_rate

gauge

keys/second

Highest backend TLS key creation rate recorded.

haproxy_process_ssl_cache_lookups_total

counter

lookups

TLS session-cache lookup attempts.

haproxy_process_ssl_cache_misses_total

counter

lookups

TLS session-cache lookup misses.

haproxy_process_http_comp_bytes_in_total

counter

bytes/second

Recent compressor input rate. This value is already a rate.

haproxy_process_http_comp_bytes_out_total

counter

bytes/second

Recent compressor output rate. This value is already a rate.

haproxy_process_limit_http_comp

gauge

bytes/second

Output-rate ceiling at which compression is disabled.

haproxy_process_current_zlib_memory

gauge

bytes

Memory occupied by zlib compression.

haproxy_process_max_zlib_memory

gauge

bytes

Configured zlib memory ceiling.

haproxy_process_current_tasks

gauge

tasks

Allocated active and sleeping tasks.

haproxy_process_current_run_queue

gauge

tasks/tasklets

Currently runnable tasks and tasklets.

haproxy_process_idle_time_percent

gauge

percent

Idle fraction of the reporting worker thread over the last second.

haproxy_process_node

gauge

1

Identity marker with the node label.

haproxy_process_description

gauge

1

Description marker with the desc label, only when configured.

haproxy_process_stopping

gauge

0/1

Worker is shutting down.

haproxy_process_jobs

gauge

jobs

Active connection and listener jobs.

haproxy_process_unstoppable_jobs

gauge

jobs

Jobs that prevent worker termination, such as master connections.

haproxy_process_listeners

gauge

listeners

Active network listeners.

haproxy_process_active_peers

gauge

connections

Verified peer connections.

haproxy_process_connected_peers

gauge

connections

Peers that completed the connection step.

haproxy_process_dropped_logs_total

counter

messages

Log messages discarded.

haproxy_process_busy_polling_enabled

gauge

0/1

Busy polling is enabled.

haproxy_process_failed_resolutions

counter

failures

Unsuccessful DNS resolutions.

haproxy_process_bytes_out_total

counter

bytes

All worker output traffic.

haproxy_process_spliced_bytes_out_total

counter

bytes

Output transferred through kernel pipes.

haproxy_process_bytes_out_rate

gauge

bytes/second

Recent output throughput, measured in 32-byte increments.

haproxy_process_recv_logs_total

counter

messages

Messages accepted by log-forwarding listeners.

haproxy_process_build_info

gauge

1

Build marker with the version label.

haproxy_process_total_warnings

counter

warnings

Warnings raised by the worker.

Process pipes_used_total and pipes_free_total report current counts. Process http_comp_bytes_in_total and http_comp_bytes_out_total report recent rates. Use these values directly.

Frontends

Metric Type Unit Meaning

haproxy_frontend_current_sessions

gauge

sessions

Currently active sessions.

haproxy_frontend_max_sessions

gauge

sessions

Highest simultaneous session count observed.

haproxy_frontend_limit_sessions

gauge

connections

Frontend/server maxconn or backend fullconn threshold.

haproxy_frontend_sessions_total

counter

sessions

Sessions processed.

haproxy_frontend_bytes_in_total

counter

bytes

Request-direction traffic.

haproxy_frontend_bytes_out_total

counter

bytes

Response-direction traffic.

haproxy_frontend_requests_denied_total

counter

requests

Requests rejected by policy.

haproxy_frontend_responses_denied_total

counter

responses

Responses rejected by policy.

haproxy_frontend_request_errors_total

counter

requests

Invalid requests received.

haproxy_frontend_status

gauge

0/1 per state

State indicator, labelled state.

haproxy_frontend_current_session_rate

gauge

events/second

Recent sessions for frontends, requests for backends and servers.

haproxy_frontend_limit_session_rate

gauge

sessions/second

Configured frontend acceptance-rate ceiling.

haproxy_frontend_max_session_rate

gauge

events/second

Peak observed session/request rate.

haproxy_frontend_http_responses_total

counter

responses

HTTP responses grouped by code class.

haproxy_frontend_http_requests_rate_max

gauge

requests/second

Highest HTTP request rate observed.

haproxy_frontend_http_requests_total

counter

requests

HTTP requests processed.

haproxy_frontend_http_comp_bytes_in_total

counter

bytes

Data submitted to response compression.

haproxy_frontend_http_comp_bytes_out_total

counter

bytes

Compressed response output.

haproxy_frontend_http_comp_bytes_bypassed_total

counter

bytes

Response data left uncompressed due to resource limits.

haproxy_frontend_http_comp_responses_total

counter

responses

Responses compressed.

haproxy_frontend_connections_rate_max

gauge

connections/second

Highest frontend connection arrival rate.

haproxy_frontend_connections_total

counter

connections

Accepted frontend connections.

haproxy_frontend_intercepted_requests_total

counter

requests

Requests handled locally, including redirects and exporter/service requests.

haproxy_frontend_denied_connections_total

counter

connections

Connections blocked by connection-stage rules.

haproxy_frontend_denied_sessions_total

counter

sessions

Sessions blocked by session-stage rules.

haproxy_frontend_failed_header_rewriting_total

counter

failures

Unsuccessful HTTP header rewrites.

haproxy_frontend_http_cache_lookups_total

counter

requests

Requests checked against HAProxy’s HTTP cache.

haproxy_frontend_http_cache_hits_total

counter

requests

Requests served from HAProxy’s HTTP cache.

haproxy_frontend_internal_errors_total

counter

errors

Failures internal to HAProxy.

Backends

Metric Type Unit Meaning

haproxy_backend_current_queue

gauge

connections

Connections waiting for a server.

haproxy_backend_max_queue

gauge

connections

Largest queue observed.

haproxy_backend_current_sessions

gauge

sessions

Currently active sessions.

haproxy_backend_max_sessions

gauge

sessions

Highest simultaneous session count observed.

haproxy_backend_limit_sessions

gauge

connections

Frontend/server maxconn or backend fullconn threshold.

haproxy_backend_sessions_total

counter

sessions

Sessions processed.

haproxy_backend_bytes_in_total

counter

bytes

Request-direction traffic.

haproxy_backend_bytes_out_total

counter

bytes

Response-direction traffic.

haproxy_backend_requests_denied_total

counter

requests

Requests rejected by policy.

haproxy_backend_responses_denied_total

counter

responses

Responses rejected by policy.

haproxy_backend_connection_errors_total

counter

connections

Failed attempts to connect to servers.

haproxy_backend_response_errors_total

counter

responses

Invalid server responses.

haproxy_backend_retry_warnings_total

counter

retries

Retried server connections.

haproxy_backend_redispatch_warnings_total

counter

redispatches

Connections reassigned after connection failures.

haproxy_backend_status

gauge

0/1 per state

State indicator, labelled state.

haproxy_backend_weight

gauge

weight

Effective load-balancing weight, summed over active backend servers.

haproxy_backend_active_servers

gauge

servers

Number of usable active servers.

haproxy_backend_backup_servers

gauge

servers

Number of usable backup servers.

haproxy_backend_check_up_down_total

counter

transitions

Transitions from UP to DOWN.

haproxy_backend_check_last_change_seconds

gauge

seconds

Elapsed time since the last availability transition.

haproxy_backend_downtime_seconds_total

counter

seconds

Accumulated time unavailable. Server needs health checks; backend needs servers.

haproxy_backend_loadbalanced_total

counter

requests

Requests selected by the load-balancer algorithm, excluding sticky routing and queue release.

haproxy_backend_current_session_rate

gauge

events/second

Recent sessions for frontends, requests for backends and servers.

haproxy_backend_max_session_rate

gauge

events/second

Peak observed session/request rate.

haproxy_backend_http_responses_total

counter

responses

HTTP responses grouped by code class.

haproxy_backend_http_requests_total

counter

requests

HTTP requests processed.

haproxy_backend_client_aborts_total

counter

aborts

Requests/connections terminated by clients.

haproxy_backend_server_aborts_total

counter

aborts

Requests/connections terminated by servers.

haproxy_backend_http_comp_bytes_in_total

counter

bytes

Data submitted to response compression.

haproxy_backend_http_comp_bytes_out_total

counter

bytes

Compressed response output.

haproxy_backend_http_comp_bytes_bypassed_total

counter

bytes

Response data left uncompressed due to resource limits.

haproxy_backend_http_comp_responses_total

counter

responses

Responses compressed.

haproxy_backend_last_session_seconds

gauge

seconds

Time since the last traffic, possibly NaN before any traffic.

haproxy_backend_queue_time_average_seconds

gauge

seconds

Smoothed queue wait over the latest 1024 samples.

haproxy_backend_connect_time_average_seconds

gauge

seconds

Smoothed connection setup time over the latest 1024 samples.

haproxy_backend_response_time_average_seconds

gauge

seconds

Smoothed server response wait over the latest 1024 samples.

haproxy_backend_total_time_average_seconds

gauge

seconds

Smoothed complete transaction time over the latest 1024 samples.

haproxy_backend_failed_header_rewriting_total

counter

failures

Unsuccessful HTTP header rewrites.

haproxy_backend_connection_attempts_total

counter

attempts

Attempts to open backend connections.

haproxy_backend_connection_reuses_total

counter

connections

Backend connections reused.

haproxy_backend_http_cache_lookups_total

counter

requests

Requests checked against HAProxy’s HTTP cache.

haproxy_backend_http_cache_hits_total

counter

requests

Requests served from HAProxy’s HTTP cache.

haproxy_backend_max_queue_time_seconds

gauge

seconds

Longest observed queue wait.

haproxy_backend_max_connect_time_seconds

gauge

seconds

Longest observed connection setup.

haproxy_backend_max_response_time_seconds

gauge

seconds

Longest observed server response wait.

haproxy_backend_max_total_time_seconds

gauge

seconds

Longest observed complete transaction.

haproxy_backend_internal_errors_total

counter

errors

Failures internal to HAProxy.

haproxy_backend_uweight

gauge

weight

Configured server weight, or backend sum of active servers' configured weights.

haproxy_backend_agg_server_check_status

gauge

servers per state

Deprecated duplicate of agg_server_status; this is server availability, not health-check result.

haproxy_backend_agg_check_status

gauge

servers per state

Backend servers grouped by latest enabled, unpaused health-check result state.

haproxy_backend_agg_server_status

gauge

servers per state

Backend servers grouped by availability state.

Servers

Metric Type Unit Meaning

haproxy_server_current_queue

gauge

connections

Connections waiting for a server.

haproxy_server_max_queue

gauge

connections

Largest queue observed.

haproxy_server_current_sessions

gauge

sessions

Currently active sessions.

haproxy_server_max_sessions

gauge

sessions

Highest simultaneous session count observed.

haproxy_server_limit_sessions

gauge

connections

Frontend/server maxconn or backend fullconn threshold.

haproxy_server_sessions_total

counter

sessions

Sessions processed.

haproxy_server_bytes_in_total

counter

bytes

Request-direction traffic.

haproxy_server_bytes_out_total

counter

bytes

Response-direction traffic.

haproxy_server_responses_denied_total

counter

responses

Responses rejected by policy.

haproxy_server_connection_errors_total

counter

connections

Failed attempts to connect to servers.

haproxy_server_response_errors_total

counter

responses

Invalid server responses.

haproxy_server_retry_warnings_total

counter

retries

Retried server connections.

haproxy_server_redispatch_warnings_total

counter

redispatches

Connections reassigned after connection failures.

haproxy_server_status

gauge

0/1 per state

State indicator, labelled state.

haproxy_server_weight

gauge

weight

Effective load-balancing weight, summed over active backend servers.

haproxy_server_active

gauge

0/1

Server role indicator: non-backup server.

haproxy_server_backup

gauge

0/1

Server role indicator: backup server.

haproxy_server_check_failures_total

counter

checks

Failed individual health checks.

haproxy_server_check_up_down_total

counter

transitions

Transitions from UP to DOWN.

haproxy_server_check_last_change_seconds

gauge

seconds

Elapsed time since the last availability transition.

haproxy_server_downtime_seconds_total

counter

seconds

Accumulated time unavailable. Server needs health checks; backend needs servers.

haproxy_server_queue_limit

gauge

connections

Configured server queue ceiling; may be NaN if unset.

haproxy_server_current_throttle

gauge

percent

Slow-start multiplier applied to weight and connection capacity.

haproxy_server_loadbalanced_total

counter

requests

Requests selected by the load-balancer algorithm, excluding sticky routing and queue release.

haproxy_server_current_session_rate

gauge

events/second

Recent sessions for frontends, requests for backends and servers.

haproxy_server_max_session_rate

gauge

events/second

Peak observed session/request rate.

haproxy_server_check_status

gauge

0/1 per state

Latest health-check result, labelled state; enabled unpaused checks only.

haproxy_server_check_code

gauge

protocol code

Latest health-check response code, or 0 before a layer 5-7 code exists.

haproxy_server_check_duration_seconds

gauge

seconds

Duration of the latest completed health check.

haproxy_server_http_responses_total

counter

responses

HTTP responses grouped by code class.

haproxy_server_http_requests_total

counter

requests

HTTP requests processed.

haproxy_server_client_aborts_total

counter

aborts

Requests/connections terminated by clients.

haproxy_server_server_aborts_total

counter

aborts

Requests/connections terminated by servers.

haproxy_server_last_session_seconds

gauge

seconds

Time since the last traffic, possibly NaN before any traffic.

haproxy_server_queue_time_average_seconds

gauge

seconds

Smoothed queue wait over the latest 1024 samples.

haproxy_server_connect_time_average_seconds

gauge

seconds

Smoothed connection setup time over the latest 1024 samples.

haproxy_server_response_time_average_seconds

gauge

seconds

Smoothed server response wait over the latest 1024 samples.

haproxy_server_total_time_average_seconds

gauge

seconds

Smoothed complete transaction time over the latest 1024 samples.

haproxy_server_agent_status

gauge

0/1 per state

Latest agent-check result, labelled state; needs enabled unpaused agent checks.

haproxy_server_agent_code

gauge

protocol code

Latest agent-check response code; needs agent checks.

haproxy_server_agent_duration_seconds

gauge

seconds

Latest completed agent-check duration; needs agent checks.

haproxy_server_failed_header_rewriting_total

counter

failures

Unsuccessful HTTP header rewrites.

haproxy_server_connection_attempts_total

counter

attempts

Attempts to open backend connections.

haproxy_server_connection_reuses_total

counter

connections

Backend connections reused.

haproxy_server_idle_connections_current

gauge

connections

Idle server connections available for reuse.

haproxy_server_idle_connections_limit

gauge

connections

Configured server idle-connection pool ceiling.

haproxy_server_max_queue_time_seconds

gauge

seconds

Longest observed queue wait.

haproxy_server_max_connect_time_seconds

gauge

seconds

Longest observed connection setup.

haproxy_server_max_response_time_seconds

gauge

seconds

Longest observed server response wait.

haproxy_server_max_total_time_seconds

gauge

seconds

Longest observed complete transaction.

haproxy_server_internal_errors_total

counter

errors

Failures internal to HAProxy.

haproxy_server_unsafe_idle_connections_current

gauge

connections

Idle connections considered unsafe for reuse in all contexts.

haproxy_server_safe_idle_connections_current

gauge

connections

Idle connections marked safe for reuse.

haproxy_server_used_connections_current

gauge

connections

Server connections currently in use.

haproxy_server_need_connections_current

gauge

connections

Estimated server connection demand.

haproxy_server_uweight

gauge

weight

Configured server weight, or backend sum of active servers' configured weights.

Average timing metrics use a smoothed 1024-sample estimate. Durations are expressed in seconds. The haproxy_server_active and haproxy_server_backup metrics identify server roles. Use haproxy_server_status with state="UP" to measure server availability.

DNS resolution

DNS metrics have resolver and nameserver labels. They contain cumulative event counts and are exposed as gauges.

Metric Meaning

haproxy_resolver_sent

DNS requests sent.

haproxy_resolver_send_error

Errors sending DNS requests.

haproxy_resolver_valid

Valid DNS responses.

haproxy_resolver_update

Server address updates following resolution.

haproxy_resolver_cname

CNAME responses processed.

haproxy_resolver_cname_error

CNAME-processing failures.

haproxy_resolver_any_err

DNS responses with an empty answer section.

haproxy_resolver_nx

NXDOMAIN results.

haproxy_resolver_timeout

DNS resolution timeouts.

haproxy_resolver_refused

Refused DNS queries.

haproxy_resolver_other

Other DNS response errors.

haproxy_resolver_invalid

Invalid DNS responses.

haproxy_resolver_too_big

DNS responses exceeding supported size.

haproxy_resolver_truncated

Truncated DNS responses.

haproxy_resolver_outdated

Responses no longer matching an active resolution.