liveBook · Manning

Stdout output plugin

As explained in Logs and Telemetry

The stdout output plugin is a Fluent Bit output plugin that writes processed events to standard output.

The stdout output plugin sends Fluent Bit events to the console. It is a quick inspection destination: attach it to a pipeline, match the events to observe, and read the emitted records while developing or troubleshooting inputs, filters, and record changes. section 5.4 section 5.1

An output definition uses `[OUTPUT]`, `Name stdout`, and `Match` to select tags. `Match *` sends all matching events to the console; a match can also name tags or combine a name with one wildcard. Dot-separated tags such as `server.cpu` or `app1.container_log` support selective output routing. section 5.4

Use stdout deliberately for these operational tasks:

  • Validate a simple pipeline locally before sending events to a service or file destination. section 2.1.3
  • Inspect the effect of filtering or record manipulation, then remove the console output after the configuration is satisfactory. section 5.4
  • Format records as JSON Lines and add an ISO 8601 date field when one event per output line is useful. section 5.4
  • Use Kubernetes-captured stdout only as a fail-safe, or route only critical errors there so console output signals serious conditions. section 5.4

Console output from a dummy input

This CLI pipeline creates a tagged dummy event and prints every matching event to stdout: `fluent-bit -q -i dummy -p dummy="{\"hello\":\"my world\"}" -t dummy1 -o stdout -m '*'`. The `-q` option suppresses unnecessary Fluent Bit logging, leaving the event output easier to inspect. section 2.1.3

Listing 5.4 Formatting output: std-output.conf
[SERVICE]
  flush 1
  log_level error     #1

[INPUT]
  name http    
  listen 0.0.0.0
  port 9881
  tag http-in

[OUTPUT]
  match *         #2
  name stdout         #3
  format json_lines          #4
  json_date_key received-date     #5
  json_date_format iso8601        #6

This configuration shows an HTTP input routed to stdout, with `format json_lines`, a custom date key, and ISO 8601 timestamps. section 5.4

How Logs and Telemetry covers it

How deep it goes
Explains output directives, tag matching, wildcard limits, formatting, and Kubernetes operational caveats.
Examples
Demonstrates dummy-input CLI output and an HTTP-input configuration formatted as JSON Lines.
What it assumes
Teaches [OUTPUT], Match, tags, and wildcard selection directly without stating prior requirements.
What you can do after
Diagnose/debug with it by viewing matched events and configuration changes directly at the console.
How it connects
Connects stdout to Fluent Bit routing, tags, filters, record manipulation, JSON Lines, and Kubernetes.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Logs and Telemetry. The section links point to the parts of the book it draws on.