Skip to content
FluxtailDocs

Docker with Fluent Bit

The Fluxtail Fluent Bit setup tails Docker JSON log files, adds container details, and sends batches to one shared HTTP JSON receiver.

Create an HTTP JSON receiver and a token bound to it with ingest:write. Copy the exact receiver URL.

Keep the token in an environment file that is not tracked:

FLUXTAIL_RECEIVER_HOST=ingest.fluxtail.io
FLUXTAIL_RECEIVER_PORT=443
FLUXTAIL_RECEIVER_PATH=/v1/receivers/RECEIVER_ID/logs
FLUXTAIL_TOKEN=ftl_RECEIVER_BOUND_TOKEN

Fluent Bit’s HTTP plugin takes the host, port, and path separately. Use the exact receiver path; do not replace it with a default.

Terminal window
docker compose up -d fluent-bit
docker compose logs -f fluent-bit
docker run --rm alpine echo 'fluxtail docker test'

Open the receiver’s stream in Live Tail and search for fluxtail docker test.

The recommended setup mounts Docker’s log directory read-only, does not use the Docker socket, keeps a filesystem retry buffer, and defaults stderr to ERROR and stdout to INFO when no severity exists.

  • Confirm the receiver path includes /v1/receivers/RECEIVER_ID/logs.
  • Confirm the URL and token come from the same active receiver.
  • Inspect docker compose logs -f fluent-bit for HTTP status codes.
  • Confirm the Docker log directory matches the host runtime.