The stdin input plugin lets Fluent Bit receive event data from another process through standard input. It fits stdout-oriented applications, including twelve-factor services, and forwards captured records into Fluent Bit’s normal pipeline. section 3.3.2 section 3.9
Configure the input around three operational choices:
- Set the input name to stdin, assign a tag such as book_stdout, and select a parser appropriate to the incoming format. section 3.3.2
- Keep parsing simple and enable buffering when the producer may emit data faster than Fluent Bit can consume it. section 3.3.2
- Send Fluent Bit output to a separate file or downstream node during testing so captured events do not mix with simulator output. section 3.3.2
Pipe formatted stdout into Fluent Bit
A producer can be piped directly into a Fluent Bit configuration: `./SimulatorConfig/stdout-formatted-run.sh | fluent-bit -c ./fluentbit/stdout-monitoring.conf`. With a plaintext parser configured, Fluent Bit captures the stream and can write events as JSON to a file. Input that does not match the expected format may be skipped as invalid JSON. section 3.3.2
Listing 3.3 Capturing stdout (fragment): stdout-monitoring2.conf
[SERVICE] flush 1 parsers_file ./fluentbit/simple-parser.conf #1 [INPUT] name stdin tag book_stdout parser plaintext #2
Use the configuration listing to inspect the minimal stdin input definition, including the parser and tag. section 3.3.2
Direct piping is operationally fragile for long-running producers: backpressure can block the source, and systemd-controlled processes may impose stdin constraints. For sustained output, writing to a log file and using the tail plugin can be safer; log rotation may then be required. section 3.3.2
