Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsJul 17, 2026·3 min de lecture

Filebeat — Lightweight Log Shipper from the Elastic Stack

A lightweight agent that reads log files, containers, and cloud services, then forwards structured events to Elasticsearch, Logstash, or any supported output for centralized observability.

Prêt pour agents

Installation avec revue préalable

Cet actif nécessite une revue. Le prompt copié demande un dry-run, affiche les écritures, puis continue seulement après confirmation.

Needs Confirmation · 64/100Policy : confirmer
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Filebeat Overview
Commande avec revue préalable
npx -y tokrepo@latest install ee448910-819a-11f1-9bc6-00163e2b0d79 --target codex

Dry-run d'abord, confirmez les écritures, puis lancez cette commande.

Introduction

Filebeat is a lightweight, open-source log shipper maintained by Elastic as part of the Beats family. It tails log files, collects container logs, and reads cloud audit trails, then delivers structured events to Elasticsearch, Logstash, Kafka, or Redis with minimal resource overhead.

What Filebeat Does

  • Tails log files and tracks read offsets for reliable at-least-once delivery
  • Ships container logs from Docker and Kubernetes via autodiscovery
  • Provides 60-plus pre-built modules for Nginx, Apache, MySQL, AWS, and more
  • Applies multiline joining, JSON parsing, and field enrichment before output
  • Integrates with Elastic Agent for unified fleet management

Architecture Overview

Filebeat runs one or more harvesters, each responsible for reading a single file and sending events to a central spooler. The spooler batches events and forwards them to the configured output (Elasticsearch, Logstash, Kafka). A registry file persists read offsets so Filebeat resumes from the correct position after restarts. Back-pressure handling pauses harvesting when the output is saturated.

Self-Hosting and Configuration

  • Install via package managers (apt, yum), Docker images, or standalone archives
  • Edit filebeat.yml to define inputs, modules, and output destinations
  • Enable modules with filebeat modules enable <name> for pre-configured dashboards
  • Use Autodiscover with Docker or Kubernetes for dynamic container log collection
  • Deploy as a DaemonSet in Kubernetes for per-node log collection

Key Features

  • Single-binary Go application with a small memory footprint (typically 30-50 MB)
  • Built-in modules provide ready-made parsing, dashboards, and ML jobs
  • Supports multiple outputs simultaneously via Logstash fan-out
  • Processors pipeline allows filtering, enrichment, and conditional routing
  • Internal queue with configurable memory or disk-backed buffering

Comparison with Similar Tools

  • Fluentd — more flexible with a plugin ecosystem but heavier on resources; Filebeat is lighter for pure log shipping
  • Fluent Bit — similarly lightweight with broader input/output options but less integrated with Elastic dashboards
  • Promtail — Loki-focused log agent; Filebeat targets Elasticsearch and the broader Elastic ecosystem
  • Vector — high-performance Rust-based pipeline; Filebeat has tighter Elastic integration and pre-built modules

FAQ

Q: Does Filebeat guarantee no log loss? A: Filebeat provides at-least-once delivery by persisting file offsets in a registry. Duplicate events are possible on unclean shutdowns.

Q: Can I use Filebeat without Elasticsearch? A: Yes. Filebeat can output to Logstash, Kafka, Redis, or any compatible endpoint.

Q: How does Filebeat handle log rotation? A: It detects renamed or truncated files and opens new harvesters as needed, continuing to track offsets by file identity (inode).

Q: What is the difference between Filebeat and Elastic Agent? A: Elastic Agent is a unified agent that can run Filebeat, Metricbeat, and other Beats internally, managed via Fleet. Standalone Filebeat is simpler for single-purpose log collection.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires