filebeat
A lightweight log shipper that tails files and container logs, enriches them with metadata, and forwards them to Elasticsearch, Logstash, or other outputs.
What is filebeat?
The filebeat image provides Filebeat, Elastic's lightweight log shipping agent and part of the Elastic (ELK) Stack. It monitors log files and container log streams, applies processors to enrich or filter events, and forwards them to a configured output — most commonly Elasticsearch directly, or Logstash for further transformation before indexing.
Unlike Logstash, which runs on the JVM and is designed for heavy-duty parsing and enrichment, Filebeat is written in Go and optimised to run with a minimal CPU and memory footprint as a sidecar or DaemonSet agent on every node. It implements backpressure-aware protocols when sending to Logstash or Elasticsearch, slowing its read rate when the downstream is busy rather than dropping events or buffering unboundedly. Filebeat remembers its position in each file it tails, so it resumes correctly after restarts or network interruptions without re-shipping already-processed lines.
In Kubernetes, Filebeat is deployed as a DaemonSet, mounts the host's container log directory, and uses the add_kubernetes_metadata processor to automatically enrich each log event with the pod name, namespace, container name, image, and labels of the container that produced it — without requiring any changes to application logging configuration.
How to use this image
In Kubernetes, Filebeat is deployed as a DaemonSet with the host log directory mounted read-only, and its configuration supplied via a ConfigMap.
Deploy Filebeat as a DaemonSet:
With a corresponding ConfigMap that collects container logs and enriches them with Kubernetes metadata before forwarding to Elasticsearch:
Once the DaemonSet rolls out, Filebeat begins tailing all container logs on each node and forwarding enriched events to Elasticsearch. Position state is persisted to /usr/share/filebeat/data so events are not re-shipped after pod restarts.
Image variants
Published under docker.elastic.co/beats/filebeat and mirrored at registry.echo.ai/filebeat, the image is versioned in lockstep with the Elastic Stack:
- filebeat:<version> — Version-pinned tags (e.g., 8.12.0) aligned with Elastic Stack releases. Filebeat, Elasticsearch, Logstash, and Kibana should all run the same major and minor version to ensure index template and API compatibility. This is the recommended tag for production.
- filebeat:latest — Tracks the most recent Elastic release. Not recommended for production given the strict version alignment requirement across the Elastic Stack.
- filebeat:<version>-oss — Open-source licensed build of Filebeat, without Elastic's proprietary features. Used in environments where the Elastic licence terms are a constraint.
Filebeat ships with built-in modules for common log formats — nginx, system, Kubernetes audit logs, and more — that bundle pre-built Elasticsearch ingest pipelines and Kibana dashboards. These are enabled per-module rather than being separate image variants.
.avif)