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).
Configuration
Make sure to provide a valid Windows configuration with the installation, a sample one is shown below:
[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 *
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.
Installation Packages
The latest stable version is 2.0.9, each version is available on the Github release as well as at https://releases.fluentbit.io/<Major Version>/fluent-bit-<Full Version>-win[32|64].[exe|zip]:
To check the integrity, use Get-FileHash cmdlet on PowerShell.
PS>Get-FileHashfluent-bit-2.0.9-win32.exe
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.
PS>Expand-Archive fluent-bit-2.0.9-win64.zip
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.
PS> .\bin\fluent-bit.exe-i dummy -o stdout
If you see the following output, it's working fine!
PS> .\bin\fluent-bit.exe-i dummy -o stdoutFluent 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/2810:13:04] [ info] [storage] initializing...[2019/06/2810:13:04] [ info] [storage] in-memory[2019/06/2810:13:04] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128[2019/06/2810:13:04] [ info] [engine] started (pid=10324)[2019/06/2810: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"}]
To halt the process, press CTRL-C in the terminal.
Installing from EXE installer
Download an EXE installer from the download page. 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.
To silently install to C:\fluent-bit directory here is an example:
PS><installer exe>/S /D=C:\fluent-bit
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.
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=.
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 winflexbison.