macOS

Fluent Bit is compatible with the latest Apple macOS software for x86_64 and Apple Silicon architectures.

Installation packages

Installation packages can be found in the Fluent Bit repository.

Requirements

You must have Homebrew installed in your system. If it isn't present, install it with the following command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Installing from Homebrew

The Fluent Bit package on Homebrew isn't officially supported, but should work for basic use cases and testing. It can be installed using:

brew install fluent-bit

Compile from source

Install build dependencies

Run the following brew command in your terminal to retrieve the dependencies:

brew install git cmake openssl bison libyaml

Download and build the source

  1. Download a copy of the Fluent Bit source code (upstream):

    If you want to use a specific version, checkout to the proper tag. For example, to use v4.0.4, use the command:

  2. To prepare the build system, you must expose certain environment variables so Fluent Bit CMake build rules can pick the right libraries:

  3. Change to the build/ directory inside the Fluent Bit sources:

  4. Build Fluent Bit. This example indicates to the build system the location the final binaries and config files should be installed:

  5. Install Fluent Bit to the previously specified directory. Writing to this directory requires root privileges.

The binaries and configuration examples can be located at /opt/fluent-bit/.

Create macOS installer from source

  1. Clone the Fluent Bit source code (upstream):

    If you want to use a specific version, checkout to the proper tag. For example, to use v4.0.4 do:

  2. To prepare the build system, you must expose certain environment variables so Fluent Bit CMake build rules can pick the right libraries:

  3. Create the specific macOS SDK target. For example, to specify macOS Big Sur (11.3) SDK environment:

  4. Change to the build/ directory inside the Fluent Bit sources:

  5. Build the Fluent Bit macOS installer:

The macOS installer will be generated as:

Finally, the fluent-bit-<fluent-bit version>-(intel or apple).pkg will be generated.

The created installer will put binaries at /opt/fluent-bit/.

Running Fluent Bit

To make the access path easier to Fluent Bit binary, extend the PATH variable:

To test, try Fluent Bit by generating a test message using the Dummy input plugin which prints to the standard output interface every one second:

You will see an output similar to this:

To halt the process, press ctrl-c in the terminal.

Last updated

Was this helpful?