Supported telemetry types
The HAProxy CXDOT Collector integration supports these telemetry types:Prerequisites
The HAProxy CXDOT Collector integration has the following prerequisites:- An HAProxy stats page that exposes the CSV export.
- Network access from the CXDOT collector to the HAProxy stats page.
Configure
To configure the HAProxy CXDOT Collector integration, follow these steps:-
Configure HAProxy to expose statistics at
/statson port8404. For example, add the following frontend to the HAProxy configuration: -
Choose how the CXDOT collector finds your HAProxy servers:
- For HAProxy pods that expose the stats page on port
8404, add theapp.kubernetes.io/name: haproxylabel to the pod template. - For HAProxy pods or Services that use another port or stats path, add autodiscovery annotations that provide the HAProxy stats URL.
- For HAProxy pods that expose the stats page on port
-
Optional: Configure static targets to collect metrics from HAProxy servers outside
your Kubernetes cluster. For example, add the following to the
values.yamlfor your Helm chart:When you configure static targets, this integration instance collects from exactly those targets instead of discovered targets. -
Optional: Configure a second integration instance to collect from both discovered
pods and static targets. For example, add the following to the
values.yamlfor your Helm chart:Thehaproxy/edgekey defines a named instance for the static targets. The barehaproxykey continues to use autodiscovery.
Validate
To validate the HAProxy CXDOT Collector integration, follow these steps:-
In Metrics Explorer, run the following query:
Confirm that the query returns one time series for each stats URL you configured, with the URL in the
cxdot.integration.targetattribute, and that each reachable URL reports1. -
In Metrics Explorer, run the following query:
Confirm that the query returns the expected time series for each target.
Configuration reference
Configure one HAProxy integration instance with the following settings. In Helm values, place these settings underconfig.integrations.haproxy. In a Collector configuration file, place
them under cxdot.integrations.haproxy.
Optional settings
-
enabledType:boolean. Optional. Default:true. Whether to enable this HAProxy integration instance. If true, the Collector collects metrics from HAProxy targets. If false, it doesn’t run this integration instance. -
endpointsType:array of object. Optional. Default:[]. Static HAProxy stats listeners ashost:portvalues. The Collector requests the/statspath over HTTP and reads its CSV output. A nonempty list disables automatic discovery for this integration instance, and the Collector scrapes only the listed targets. -
endpoints[].endpointType:string. Required. HAProxy statistics listener ashost:port. The Collector requests/statsover HTTP and reads its CSV output. -
collection_intervalType:duration. Optional. Default:10s. How often the Collector requests statistics from each HAProxy target. -
timeoutType:duration. Optional. Default:10s. Maximum time the Collector waits for an HAProxy statistics request to complete. -
disable_keep_alivesType:boolean. Optional. Default:true. Whether to close the connection after each statistics request. If true, the Collector closes the connection so that an idle connection doesn’t increasehaproxy.sessions.count. If false, the Collector keeps the connection open for reuse. Annotation-discovered endpoints instead take connection persistence from the annotation’spersist_connections,tls_use_host_header,headers, andextra_headersfields.