liveBook · Manning

Plugin

As explained in Logs and Telemetry

A plugin is an independently implemented software component that extends an application's capabilities through a defined integration interface.

A plugin is a functional building block that extends Fluent Bit through defined interfaces. Inputs capture events, filters apply processing logic, and outputs deliver events onward. The same term also applies when functionality is compiled into the Fluent Bit executable rather than supplied as a separate deployable file. section 1.2 section 2.1.2

Plugin interfaces manage coupling and enable extensibility. They support source, target, and filtering capabilities, letting a pipeline combine independently selected components instead of requiring every integration to be built into application-specific logic. section 1.3.3 section 2.1.2

Choose plugins by the role they play in an event pipeline:

  • Input plugins collect OS events, system metrics, application logs, event-driven data, or network-pulled data. section 3.1
  • Filter plugins add custom processing logic; Lua is suited to quickly defining small filter behaviors. section 1.3.3
  • Output plugins route processed events to destinations such as stdout or systems reachable through standard protocols. section 2.1.2 section 3.1

Inspect and compose plugins from the CLI

Use fluent-bit -i dummy -h to inspect configuration details for the dummy input plugin. Pipeline controls then name an input with -i, an output with -o, a filter with -F, and plugin properties with -p name=value; for example, stdout can be selected as an output. External plugins can be loaded by supplying their location with --plugin. section 2.1.2

Extensions can be precompiled in C, Go, or WebAssembly, while Lua offers a scripting path for filters. Go-based plugins may require C-to-Go type translation, regression testing across Fluent Bit revisions, compatible builds, and added deployment and support planning. section 1.3.3 section 9.5.2

Table 2.2 Log operation CLI controls
Short parameter
Long parameter
Description
-C
--custom
Enables the use of custom sources (inputs) or sinks (outputs).
-e
--plugin
Identifies where an external plugin should be loaded from.
-f
--flush
Allows us to change the flush frequency by providing an integer representing a number of seconds. (No value means that flush defaults to every second.) The flush represents the frequency at which the log events are processed downstream, regardless of how full the buffering capacity is.
-l
--log_file
Allows us to direct the log events to a log file rather than the console. The console still gets a brief startup configuration summary.
-w
--workdir
Defines where Fluent Bit puts any temporary files.
-H
--http
Enables the HTTP server, which can be used to address HTTP GET REST calls that can be used to retrieve information about the Fluent Bit node, such as health, metrics, and build details. Except for the response to the root URL, the other endpoints start with /api/v1/.
-P
--port
Allows a different port from the default 2020 to be defined for the HTTP server.
-s
--coro_stack_size
Sets the stack size for coroutines (defaults to 24 KB).

Use the log-operation controls to locate the external-plugin loading option and distinguish it from pipeline input, output, filter, and property controls. section 2.1.2

How Logs and Telemetry covers it

How deep it goes
Defines plugin roles and interfaces, then defers extension-language trade-offs to later treatment.
Examples
Uses dummy input help, stdout output selection, CLI pipeline controls, and Go input/output plugin code structure.
What it assumes
Assumes familiarity with Fluent Bit event pipelines while introducing plugin terminology and roles directly.
What you can do after
Operate/configure plugins through Fluent Bit CLI controls and assess external-extension deployment requirements.
How it connects
Connects inputs, outputs, filters, events, Fluentd, OpenTelemetry, HTTP, TCP, and the forward protocol.

Also explained in

Compare how 6 books explain plugin →

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.