Skip to main content
Collect HAProxy access logs — frontend/backend connections, timing, and status codes — with the OpenTelemetry Collector. HAProxy emits logs over syslog, so the usual setup is HAProxy → rsyslog → a file the Collector tails. The same Collector can also forward traces and metrics from your apps — see Connect OpenTelemetry Collector to Bronto.

Prerequisites

  • A Bronto account and API key (how to create one)
  • HAProxy logging to local syslog (log 127.0.0.1 local0 in haproxy.cfg), with rsyslog writing local0 to /var/log/haproxy.log
  • An OpenTelemetry Collector (recommended) or Fluent Bit installed on the same host

Configure the Collector

/etc/otel/config.yaml
receivers:
  filelog/haproxy:
    include:
      - /var/log/haproxy.log
    resource:
      service.name: haproxy
      service.namespace: <YOUR_COLLECTION_NAME>

processors:
  batch:

exporters:
  otlphttp/brontologs:
    logs_endpoint: "https://ingestion.<REGION>.bronto.io/v1/logs"
    compression: gzip
    headers:
      x-bronto-api-key: <YOUR_API_KEY>

service:
  pipelines:
    logs:
      receivers: [filelog/haproxy]
      processors: [batch]
      exporters: [otlphttp/brontologs]
Set <REGION> to eu or us. No rsyslog on the host? Receive HAProxy’s syslog stream directly with the OTel Collector’s syslog receiver instead of filelog.

What you will see in Bronto

Open Search and filter by service.name = haproxy. The HTTP log format includes the client IP, the frontend and backend names, the chosen server, connection and response timers (queue, connect, response, total), the status code, bytes, and the session termination state. Bronto’s Custom Parser has built-in HAProxy support, so these fields are extracted automatically.

Troubleshooting

  • No logs? Confirm log 127.0.0.1 local0 is set in haproxy.cfg and that rsyslog routes local0.* to /var/log/haproxy.log, then restart both services.
  • For general issues, see OTel Collector troubleshooting.

Alternative: Fluent Bit

If you already run Fluent Bit, tail the HAProxy log file and forward it over HTTP:
fluent-bit.conf
[INPUT]
    name  tail
    path  /var/log/haproxy.log
    tag   haproxy

[OUTPUT]
    name        http
    match       haproxy
    host        ingestion.<REGION>.bronto.io
    port        443
    tls         on
    format      json_lines
    compress    gzip
    header      x-bronto-api-key    <YOUR_API_KEY>
    header      x-bronto-dataset    haproxy
    header      x-bronto-collection <YOUR_COLLECTION_NAME>
Set Format to json_lines, not json. See Connect Fluent Bit to Bronto for installation.