Giter Site home page Giter Site logo

fluent-bit-plugin's Introduction

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.

Fluent Bit API development/usage is out of the scope of this article.

Requirements

  • Fluent Bit Source code, version >= 1.2
  • C compiler: GCC or Clang
  • CMake3

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:

$ cd build/

Now we will provide CMake (our build system) two important variables:

  • FLB_SOURCE: absolute path to source code of Fluent Bit.
  • PLUGIN_NAME: directory name of the project that we aim to build. Note that any plugin name must have it proper prefix as the example mentioned above.

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:

$ cmake -DFLB_SOURCE=/tmp/fluent-bit -DPLUGIN_NAME=out_stdout2 ../

then type 'make' to build the plugin:

$ 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.

License

This program is under the terms of the Apache License v2.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.