$ make
Scanning dependencies of target flb-out_stdout2
[ 50%] Building C object out_stdout2/CMakeFiles/flb-out_stdout2.dir/stdout2.c.o
[100%] Linking C shared library ../flb-out_stdout2.so
[100%] Built target flb-out_stdout2
If you query the content of the current directory you will find the new shared library created:
$ ls -l *.so
-rwxr-xr-x 1 edsiper edsiper 17288 jun 20 16:33 flb-out_stdout2.so
that .so file is our dynamic plugin that now can be loaded from Fluent Bit through the plugins configuration file.
Fluent Bit Plugin
The following repository provides the structure and build-system helpers to develop C dynamic plugins for Fluent Bit like inputs, filters and outputs.
Requirements
Getting Started
In the following steps we will build the example plugin provided called out_stdout2. As a first step get into the build/ directory:
Now we will provide CMake (our build system) two important variables:
Assuming that Fluent Bit source code is located at /tmp/fluent-bit and we will build out_stdout2, we will run CMake with the following options:
then type ‘make’ to build the plugin:
If you query the content of the current directory you will find the new shared library created:
that .so file is our dynamic plugin that now can be loaded from Fluent Bit through the plugins configuration file.
License
This program is under the terms of the Apache License v2.0.