arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Windows

Fluent Bit is distributed as fluent-bit package for Windows and as a Windows container on Docker Hub. Fluent Bit has two flavours of Windows installers: a ZIP archive (for quick testing) and an EXE installer (for system installation).

Not all plugins are supported on Windows: the CMake configurationarrow-up-right shows the default set of supported plugins.

hashtag
Configuration

Make sure to provide a valid Windows configuration with the installation, a sample one is shown below:

hashtag
Migration to Fluent Bit

From version 1.9, td-agent-bit is a deprecated package and was removed after 1.9.9. The correct package name to use now is fluent-bit.

hashtag
Installation Packages

The latest stable version is 3.1.9. Each version is available via the following download URLs.

INSTALLERS
SHA256 CHECKSUMS

Note these are now using the Github Actions built versions, the legacy AppVeyor builds are still available (AMD 32/64 only) at releases.fluentbit.io but are deprecated.

MSI installers are also available:

To check the integrity, use Get-FileHash cmdlet on PowerShell.

hashtag
Installing from ZIP archive

Download a ZIP archive from above. There are installers for 32-bit and 64-bit environments, so choose one suitable for your environment.

Then you need to expand the ZIP archive. You can do this by clicking "Extract All" on Explorer, or if you're using PowerShell, you can use Expand-Archive cmdlet.

The ZIP package contains the following set of files.

Now, launch cmd.exe or PowerShell on your machine, and execute fluent-bit.exe as follows.

If you see the following output, it's working fine!

To halt the process, press CTRL-C in the terminal.

hashtag
Installing from EXE installer

Download an EXE installer from above. It has both 32-bit and 64-bit builds. Choose one which is suitable for you.

Double-click the EXE installer you've downloaded. The installation wizard will automatically start.

Click Next and proceed. By default, Fluent Bit is installed into C:\Program Files\fluent-bit\, so you should be able to launch fluent-bit as follows after installation.

hashtag
Installer options

The Windows installer is built by [CPack using NSIS() and so supports the that all NSIS installers do for silent installation and the directory to install to.

To silently install to C:\fluent-bit directory here is an example:

The uninstaller automatically provided also supports a silent un-install using the same /S flag. This may be useful for provisioning with automation like Ansible, Puppet, etc.

hashtag
Windows Service Support

Windows services are equivalent to "daemons" in UNIX (i.e. long-running background processes). Since v1.5.0, Fluent Bit has the native support for Windows Service.

Suppose you have the following installation layout:

To register Fluent Bit as a Windows service, you need to execute the following command on Command Prompt. Please be careful that a single space is required after binpath=.

Now Fluent Bit can be started and managed as a normal Windows service.

To halt the Fluent Bit service, just execute the "stop" command.

To start Fluent Bit automatically on boot, execute the following:

hashtag
[FAQ] Fluent Bit fails to start up when installed under C:\Program Files

Quotations are required if file paths contain spaces. Here is an example:

hashtag
[FAQ] How can I manage Fluent Bit service via PowerShell?

Instead of sc.exe, PowerShell can be used to manage Windows services.

Create a Fluent Bit service:

Start the service:

Query the service status:

Stop the service:

Remove the service (requires PowerShell 6.0 or later)

hashtag
Compile from Source

If you need to create a custom executable, you can use the following procedure to compile Fluent Bit by yourself.

hashtag
Preparation

First, you need Microsoft Visual C++ to compile Fluent Bit. You can install the minimum toolkit by the following command:

When asked which packages to install, choose "C++ Build Tools" (make sure that "C++ CMake tools for Windows" is selected too) and wait until the process finishes.

Also you need to install flex and bison. One way to install them on Windows is to use .

Add the path C:\WinFlexBison to your systems environment variable "Path". .

It is important to have installed OpenSSL binaries, at least the library files and headers.

Also you need to install to pull the source code from the repository.

hashtag
Compilation

Open the start menu on Windows and type "Command Prompt for VS". From the result list select the one that corresponds to your target system ( x86 or x64).

Note: Check that the installed OpenSSL library files match the selected target. You can check the library files by using the dumpbin command with the /headers option .

Clone the source code of Fluent Bit.

Compile the source code.

Now you should be able to run Fluent Bit:

hashtag
Packaging

To create a ZIP package, call cpack as follows:

[SERVICE]
    # Flush
    # =====
    # set an interval of seconds before to flush records to a destination
    flush        5

    # Daemon
    # ======
    # instruct Fluent Bit to run in foreground or background mode.
    daemon       Off

    # Log_Level
    # =========
    # Set the verbosity level of the service, values can be:
    #
    # - error
    # - warning
    # - info
    # - debug
    # - trace
    #
    # by default 'info' is set, that means it includes 'error' and 'warning'.
    log_level    info

    # Parsers File
    # ============
    # specify an optional 'Parsers' configuration file
    parsers_file parsers.conf

    # Plugins File
    # ============
    # specify an optional 'Plugins' configuration file to load external plugins.
    plugins_file plugins.conf

    # HTTP Server
    # ===========
    # Enable/Disable the built-in HTTP Server for metrics
    http_server  Off
    http_listen  0.0.0.0
    http_port    2020

    # Storage
    # =======
    # Fluent Bit can use memory and filesystem buffering based mechanisms
    #
    # - https://docs.fluentbit.io/manual/administration/buffering-and-storage
    #
    # storage metrics
    # ---------------
    # publish storage pipeline metrics in '/api/v1/storage'. The metrics are
    # exported only if the 'http_server' option is enabled.
    #
    storage.metrics on

[INPUT]
    Name         winlog
    Channels     Setup,Windows PowerShell
    Interval_Sec 1

[OUTPUT]
    name  stdout
    match *

fluent-bit-3.1.9-win32.msiarrow-up-right
fluent-bit-3.1.9-win64.msiarrow-up-right
fluent-bit-3.1.9-winarm64.msiarrow-up-right
https://cmake.org/cmake/help/latest/cpack_gen/nsis.htmlarrow-up-right
default optionsarrow-up-right
winflexbisonarrow-up-right
Here's how to do thatarrow-up-right
gitarrow-up-right
Installation wizard screenshot
PS> Get-FileHash fluent-bit-3.1.9-win32.exe
PS> Expand-Archive fluent-bit-3.1.9-win64.zip
fluent-bit
β”œβ”€β”€ bin
β”‚   β”œβ”€β”€ fluent-bit.dll
β”‚   └── fluent-bit.exe
β”‚   └── fluent-bit.pdb
β”œβ”€β”€ conf
β”‚   β”œβ”€β”€ fluent-bit.conf
β”‚   β”œβ”€β”€ parsers.conf
β”‚   └── plugins.conf
└── include
    β”‚   β”œβ”€β”€ flb_api.h
    β”‚   β”œβ”€β”€ ...
    β”‚   └── flb_worker.h
    └── fluent-bit.h
PS> .\bin\fluent-bit.exe -i dummy -o stdout
PS> .\bin\fluent-bit.exe  -i dummy -o stdout
Fluent Bit v2.0.x
* Copyright (C) 2019-2020 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

[2019/06/28 10:13:04] [ info] [storage] initializing...
[2019/06/28 10:13:04] [ info] [storage] in-memory
[2019/06/28 10:13:04] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
[2019/06/28 10:13:04] [ info] [engine] started (pid=10324)
[2019/06/28 10:13:04] [ info] [sp] stream processor started
[0] dummy.0: [1561684385.443823800, {"message"=>"dummy"}]
[1] dummy.0: [1561684386.428399000, {"message"=>"dummy"}]
[2] dummy.0: [1561684387.443641900, {"message"=>"dummy"}]
[3] dummy.0: [1561684388.441405800, {"message"=>"dummy"}]
PS> C:\Program Files\fluent-bit\bin\fluent-bit.exe -i dummy -o stdout
PS> <installer exe> /S /D=C:\fluent-bit
C:\fluent-bit\
β”œβ”€β”€ conf
β”‚   β”œβ”€β”€ fluent-bit.conf
β”‚   └── parsers.conf
β”‚   └── plugins.conf
└── bin
    β”œβ”€β”€ fluent-bit.dll
    └── fluent-bit.exe
    └── fluent-bit.pdb
% sc.exe create fluent-bit binpath= "\fluent-bit\bin\fluent-bit.exe -c \fluent-bit\conf\fluent-bit.conf"
% sc.exe start fluent-bit
% sc.exe query fluent-bit
SERVICE_NAME: fluent-bit
    TYPE               : 10  WIN32_OWN_PROCESS
    STATE              : 4 Running
    ...
% sc.exe stop fluent-bit
% sc.exe config fluent-bit start= auto
% sc.exe create fluent-bit binpath= "\"C:\Program Files\fluent-bit\bin\fluent-bit.exe\" -c \"C:\Program Files\fluent-bit\conf\fluent-bit.conf\""
PS> New-Service fluent-bit -BinaryPathName "C:\fluent-bit\bin\fluent-bit.exe -c C:\fluent-bit\conf\fluent-bit.conf" -StartupType Automatic
PS> Start-Service fluent-bit
PS> get-Service fluent-bit | format-list
Name                : fluent-bit
DisplayName         : fluent-bit
Status              : Running
DependentServices   : {}
ServicesDependedOn  : {}
CanPauseAndContinue : False
CanShutdown         : False
CanStop             : True
ServiceType         : Win32OwnProcess
PS> Stop-Service fluent-bit
PS> Remove-Service fluent-bit
PS> wget -o vs.exe https://aka.ms/vs/16/release/vs_buildtools.exe
PS> start vs.exe
PS> wget -o winflexbison.zip https://github.com/lexxmark/winflexbison/releases/download/v2.5.22/win_flex_bison-2.5.22.zip
PS> Expand-Archive winflexbison.zip -Destination C:\WinFlexBison
PS> cp -Path C:\WinFlexBison\win_bison.exe C:\WinFlexBison\bison.exe
PS> cp -Path C:\WinFlexBison\win_flex.exe C:\WinFlexBison\flex.exe
PS> wget -o git.exe https://github.com/git-for-windows/git/releases/download/v2.28.0.windows.1/Git-2.28.0-64-bit.exe
PS> start git.exe
% git clone https://github.com/fluent/fluent-bit
% cd fluent-bit/build
% cmake .. -G "NMake Makefiles"
% cmake --build .
% .\bin\debug\fluent-bit.exe -i dummy -o stdout
% cpack -G ZIP
fluent-bit-3.1.9-win32.exearrow-up-right
a42458b6275cd08bbede45ffc9f3d7abd3145e7a82bd806226b86e5cf67793bbarrow-up-right
fluent-bit-3.1.9-win32.ziparrow-up-right
3eb8bcdbb394bed326b19386ba95c932819aaa6ea0418adbce6675dd98656b41arrow-up-right
fluent-bit-3.1.9-win64.exearrow-up-right
ccc12e5c01e9e87b88d431ecae34c014d2b227d2d72282359795605e1efeea3darrow-up-right
fluent-bit-3.1.9-win64.ziparrow-up-right
e83b9f1d8c91ebdbaec1b95426c54d1df55f09c84b5446ca1476662ea72f3a36arrow-up-right
fluent-bit-3.1.9-winarm64.exearrow-up-right
f87aaa56ed3e0dfca39947f0d46e2a7721d89c08efd58fd3f7bf0968522ffc13arrow-up-right
fluent-bit-3.1.9-winarm64.ziparrow-up-right
4be74c9696836fd802d79a00e65e53e13f901a2e3adb6c7786e74ffde89b072barrow-up-right