Exec WASI

The Exec WASI input plugin lets you execute Wasm programs that are WASI targets like external programs and collect event logs from there.

Configuration parameters

The plugin supports the following configuration parameters:

Key
Description
Default

accessible_paths

Specify the allowed list of paths to be able to access paths from Wasm programs.

.

buf_size

Size of the buffer. Review unit sizes for allowed values.

4096

interval_nsec

Polling interval (nanosecond).

0

interval_sec

Polling interval (seconds).

1

oneshot

Execute the command only once at startup.

false

parser

Specify the name of a parser to interpret the entry as a structured message.

threaded

Indicates whether to run this input in its own thread.

false

wasi_path

The location of a Wasm program file.

wasm_heap_size

Size of the heap size of Wasm execution. Review unit sizes for allowed values.

8192

wasm_stack_size

Size of the stack size of Wasm execution. Review unit sizes for allowed values.

8192

Configuration examples

Here is a configuration example.

in_exec_wasi can handle parsers. To retrieve from structured data from a Wasm program, you must create a parser.conf:

The time_format should be aligned for the format your using for timestamps.

This example assumes the Wasm program writes JSON style strings to stdout.

Then, you can specify the parsers.conf in the main Fluent Bit configuration:

Last updated

Was this helpful?