Windows
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
Fluent Bit is distributed as the fluent-bit
package for Windows and as a Windows container on Docker Hub. Fluent Bit provides two Windows installers: a ZIP
archive and an EXE
installer.
Not all plugins are supported on Windows. The CMake configuration shows the default set of supported plugins.
Provide a valid Windows configuration with the installation.
The following configuration is an example:
service:
flush: 5
daemon: off
log_level: info
parsers_file: parsers.yaml
plugins_file: plugins.yaml
http_server: off
http_listen: 0.0.0.0
http_port: 2020
storage.metrics: on
pipeline:
inputs:
- name: winlog
channels: Setup,Windows Powershell
interval_sec: 1
outputs:
- name: stdout
match: '*'
For version 1.9 and later, td-agent-bit
is a deprecated package and was removed after 1.9.9. The correct package name to use now is fluent-bit
.
The latest stable version is 4.0.7.
These are now using the Github Actions built versions. 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 the Get-FileHash
cmdlet for PowerShell.
Get-FileHash fluent-bit-4.0.7-win32.exe
Download a ZIP archive. Choose the suitable installers for your 32-bit or 64-bit environments.
Expand the ZIP archive. You can do this by clicking Extract All in Explorer or Expand-Archive
in PowerShell.
Expand-Archive fluent-bit-4.0.7-win64.zip
The ZIP package contains the following set of files.
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
Launch cmd.exe
or PowerShell on your machine, and execute fluent-bit.exe
:
fluent-bit.exe -i dummy -o stdout
The following output indicates Fluent Bit is running:
fluent-bit.exe -i dummy -o stdout
...
[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 Control+C
in the terminal.
Download an EXE
installer for the appropriate 32-bit or 64-bit build.
Double-click the EXE
installer you've downloaded. The installation wizard starts.
Click Next and finish the installation. By default, Fluent Bit is installed in C:\Program Files\fluent-bit\
.
& "C:\Program Files\fluent-bit\bin\fluent-bit.exe" -i dummy -o stdout
The Windows installer is built by CPack
using NSIS and supports the default NSIS options for silent installation and install directory.
To silently install to C:\fluent-bit
directory here is an example:
<installer exe> /S /D=C:\fluent-bit
The uninstaller also supports a silent uninstall using the same /S
flag. This can be used for provisioning with automation like Ansible, Puppet, and so on.
Windows services are equivalent to daemons in Unix (long-running background processes). For v1.5.0 and later, Fluent Bit has native support for Windows services.
For example, you have the following installation layout:
C:\fluent-bit\
├── conf
│ ├── fluent-bit.conf
│ └── parsers.conf
│ └── plugins.conf
└── bin
├── fluent-bit.dll
└── fluent-bit.exe
└── fluent-bit.pdb
To register Fluent Bit as a Windows service, execute the following command on at a command prompt. A single space is required after binpath=
.
sc.exe create fluent-bit binpath= "\fluent-bit\bin\fluent-bit.exe -c \fluent-bit\conf\fluent-bit.conf"
Fluent Bit can be started and managed as a normal Windows service.
sc.exe start fluent-bit
sc.exe query fluent-bit
SERVICE_NAME: fluent-bit
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 Running
...
To halt the Fluent Bit service, use the stop
command.
sc.exe stop fluent-bit
To start Fluent Bit automatically on boot, execute the following:
sc.exe config fluent-bit start= auto
Instead of sc.exe
, PowerShell can be used to manage Windows services.
Create a Fluent Bit service:
New-Service fluent-bit -BinaryPathName "`"C:\Program Files\fluent-bit\bin\fluent-bit.exe`" -c `"C:\Program Files\fluent-bit\conf\fluent-bit.conf`"" -StartupType Automatic -Description "This service runs Fluent Bit, a log collector that enables real-time processing and delivery of log data to centralized logging systems."
Start the service:
Start-Service fluent-bit
Query the service status:
get-Service fluent-bit | format-list
Name : fluent-bit
DisplayName : fluent-bit
Status : Running
DependentServices : {}
ServicesDependedOn : {}
CanPauseAndContinue : False
CanShutdown : False
CanStop : True
ServiceType : Win32OwnProcess
Stop the service:
Stop-Service fluent-bit
Remove the service (requires PowerShell 6.0 or later)
Remove-Service fluent-bit
If you need to create a custom executable, use the following procedure to compile Fluent Bit by yourself.
Install Microsoft Visual C++ to compile Fluent Bit. You can install the minimum toolkit using the following command:
wget -o vs.exe https://aka.ms/vs/16/release/vs_buildtools.exe
start vs.exe
Choose C++ Build Tools
and C++ CMake tools for Windows
and wait until the process finishes.
Install flex and bison. One way to install them on Windows is to use winflexbison
.
wget -o winflexbison.zip https://github.com/lexxmark/winflexbison/releases/download/v2.5.22/win_flex_bison-2.5.22.zip
Expand-Archive winflexbison.zip -Destination C:\WinFlexBison
cp -Path C:\WinFlexBison\win_bison.exe C:\WinFlexBison\bison.exe
cp -Path C:\WinFlexBison\win_flex.exe C:\WinFlexBison\flex.exe
Add the path C:\WinFlexBison
to your systems environment variable Path
. Here's how to do that.
Install OpenSSL binaries, at least the library files and headers.
Install Git to pull the source code from the repository.
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
start git.exe
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
).
Verify the installed OpenSSL library files match the selected target. You can examine the library files by using the dumpbin
command with the /headers
option.
Clone the source code of Fluent Bit.
git clone https://github.com/fluent/fluent-bit
cd fluent-bit/build
Compile the source code.
cmake .. -G "NMake Makefiles"
cmake --build .
Now you should be able to run Fluent Bit:
fluent-bit.exe -i dummy -o stdout
To create a ZIP package, call cpack
as follows:
cpack -G ZIP