liveBook · Manning

Null output plugin

As explained in Logs and Telemetry

A null output plugin is a Fluent Bit output component that accepts processed events and discards them without forwarding, storing, or sending them to an external destination.

A null output plugin is a Fluent Bit destination that consumes routed events and discards them, equivalent to directing output to /dev/null. Unlike most outputs, it does not forward events over a network or store them externally. section 5.1 section 5.3

Use the plugin when you need to:

  • Complete a routing path while intentionally sending selected events nowhere. section 5.3
  • Measure how many records and bytes reach an output without involving a real backend. section 5.3 section 5.3.2
  • Separate ingestion or pipeline throughput problems from backend output problems. section 5.3

Discard all generated events

Configure a catch-all output with `name null` and `match *`. A practical test uses CPU, network-interface, and memory inputs, then runs `fluent-bit -c fluentbit/null-output.conf`. The inputs and the null output should report similar record and byte totals, allowing for small timing differences when metrics are collected. section 5.3.2

Listing 5.3 Using the null output plugin: null-output.conf
[SERVICE]
  Flush 1
  log_level debug
  HTTP_server  On        #1
  HTTP_listen  0.0.0.0
  HTTP_port     2020
  storage.metrics On

[INPUT]
  name cpu
  interval_nsec 10
  tag book_vm_cpu

[INPUT]
  name netif
  interface eth0
  interval_nsec 10
  tag book_vm_network

[INPUT]
  name mem
  interval_nsec 10
  tag book_vm_memory

[OUTPUT]
  name null     #2
  match *

Inspect the complete Fluent Bit configuration, including the HTTP server, plugin metrics, sample inputs, null output, and catch-all routing rule. section 5.3.2

Enable Fluent Bit's HTTP server and `storage.metrics` to observe the pipeline. The metrics API reports plugin throughput as record counts and byte volumes; health and storage endpoints provide additional operational data. An exporter can expose metrics separately when the main HTTP server's security controls should remain independent. section 5.3.1

How Logs and Telemetry covers it

How deep it goes
Defines the plugin, its two required attributes, routing behavior, and metrics-based diagnosis without detailing implementation internals.
Examples
Demonstrates CPU, network-interface, and memory inputs routed through a catch-all null output and inspected through Fluent Bit metrics.
What it assumes
Assumes familiarity with Fluent Bit configuration, routing matches, input plugins, and service-level HTTP settings.
What you can do after
Diagnoses pipeline throughput by routing events to null and comparing input and output record and byte metrics.
How it connects
Connects output routing with input plugins, filters, throughput metrics, HTTP APIs, and backend performance diagnosis.

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.