RousselTMLEARNING

TP · Fluent Bit: from discovery to expertise

Lab: First Fluent Bit pipeline to Loki

What you will learn in this TP
  • Read a file with tail
  • Filter and mask
  • Send to Loki

Introduction #

What you will learn in this section
  • Read a file with tail
  • Filter and mask
  • Send to Loki

Context. An application writes JSON logs to disk, including useless health checks and customer e-mail addresses. You set up clean collection to Loki.

Prerequisites: Docker Compose  ·  Estimated time: 40 min

Clean log collection in a single configuration.

Setup #

Guided steps, with their solutions.

  1. 1. Generate logs

    Why? A generator reproduces a real application: useful logs, health checks and personal data.

    Create a Compose file with a generator that writes to a shared volume.
  2. 2. Write the configuration

    Why? Each stage has a role: read (tail + JSON parser), filter (grep), mask and enrich (modify), send (loki).

    Create fluent-bit.yaml.
  3. 3. Start Fluent Bit

    Why? The stdout output lets you check the records before looking at Loki.

    Add Fluent Bit to the Compose file and look at its logs.
  4. 4. Query Loki

    Why? You check that logs arrive and carry the level label.

    Count the errors in Loki.
  5. 5. Monitor the agent

    Why? The built-in metrics tell you how many records go in and out.

    Check the input and output counters.

Difficulty level : ●●○○○ (2/5)

My progress

  • ⏱ Estimated time : ≈ 40 min

Sign in to track your progress and take notes. Sign in

💬 Ask a question

Recommended Articles

Collecteurs de logs légers : Fluent Bit, Vector et les autres

Pourquoi un collecteur de logs, ce qui distingue les agents légers (Fluent Bit, Vector) des colle...

Fluent Bit : pipeline, configuration et plugins essentiels

Les concepts de Fluent Bit (inputs, parsers, filters, tags et match, buffer, outputs), la configu...

Fluent Bit : parsers et filters, structurer et transformer les logs

Structurer et transformer les logs dans Fluent Bit : parsers (json, regex, logfmt, ltsv), parsers...

Fluent Bit : les outputs (sorties), routage et fiabilité de l'envoi

Envoyer les données de Fluent Bit : routage par Match et Match_Regex, sorties Loki, Elasticsearch...

Fluent Bit : les inputs (entrées) du pipeline en détail

Tout sur les inputs de Fluent Bit : rôle des tags, lecture de fichiers avec tail (positions, rota...

Bonnes pratiques de collecte de logs avec Fluent Bit et Vector

Check-list de production pour la collecte de logs : structure, filtrage à la source, masquage, ta...

Fluent Bit sur Kubernetes : DaemonSet, multiline, tampon et supervision

Déployer Fluent Bit sur Kubernetes avec Helm, enrichir avec le filtre kubernetes, gérer les logs ...

Fluent Bit ou Vector ? Choisir, combiner et migrer

Comparer Fluent Bit et Vector (performances, transformations, écosystème, gouvernance), les combi...

Ingestion Elasticsearch : Bulk API, ingest pipelines, enrich et reindex

Ingérer et transformer des données dans Elasticsearch : Bulk API, ingest pipelines et processeurs...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!