HAProxy receiver

The HAProxy receiver generates metrics by polling periodically the HAProxy process through a dedicated socket or HTTP URL

The HAProxy receiver generates metrics by polling periodically the HAProxy process through a dedicated socket or HTTP URL. The supported pipeline type is metrics. See Process your data with pipelines for more information.

Note: Out-of-the-box dashboards and navigators aren’t supported for the HAProxy receiver yet.

Deploy the collector

See Deploy the Splunk Distribution of the OpenTelemetry Collector.

Configure the receiver

Edit your OpenTelemetry Collector configuration file as follows.

  1. Add haproxy to the receivers section:

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

    You can configure the following settings:

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

    • collection_interval. Optional, 1m by default. The scraping collection interval.

    • initial_delay. Optional, 1s by default. Defines how long this receiver waits before starting.

  2. Include the receiver in service.pipelines.metrics :

    YAML
    service:
      pipelines:
        metrics:
          receivers: [haproxy]

Restart the collector

The restart command varies depending on what platform you deployed the collector on and what tool you used to deploy it. Here are general examples of the restart command:

Linux

Linux with installer script:

BASH
sudo systemctl restart splunk-otel-collector
Windows

Windows with installer script:

BASH
stop-service splunk-otel-collector
start-service splunk-otel-collector
Kubernetes

Kubernetes with Helm:

BASH
helm upgrade your-splunk-otel-collector splunk-otel-collector-chart/splunk-otel-collector -f your-override-values.yaml

where splunk-otel-collector-chart is the name you gave to the Helm chart in the helm repo add command.

Settings reference

The following table shows the configuration options for the HAProxy receiver:

included

https://raw.githubusercontent.com/splunk/collector-config-tools/main/cfg-metadata/receiver/haproxy.yaml

Metrics reference

The following metrics, resource attributes, and attributes are available.

included

https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/haproxyreceiver.yaml

Activate or deactivate specific metrics

You can activate or deactivate specific metrics by setting the enabled field in the metrics section for each metric. For example:

YAML
receivers:
  samplereceiver:
    metrics:
      metric-one:
        enabled: true
      metric-two:
        enabled: false

The following is an example of host metrics receiver configuration with activated metrics:

YAML
receivers:
  hostmetrics:
    scrapers:
      process:
        metrics:
          process.cpu.utilization:
            enabled: true
Note: Deactivated metrics aren’t sent to Splunk Observability Cloud.
Billing
  • If you’re in a MTS-based subscription, all metrics count towards metrics usage.

  • If you’re in a host-based plan, metrics listed as active (Active: Yes) on this document are considered default and are included free of charge.

Learn more at Infrastructure Monitoring subscription usage (Host and metric plans).

Troubleshooting

See Troubleshoot the Splunk OpenTelemetry Collector.