-
Notifications
You must be signed in to change notification settings - Fork 56
Building Fluentd
The instructions provided below specify the steps to build Fluentd 1.18.0 on Linux on IBM Z for the following distributions:
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
- SLES (15 SP6)
- Ubuntu (20.04, 22.04, 24.04, 24.10)
General Notes:
-
When following the steps below please use a standard permission user unless otherwise specified.
-
A directory
/<source_root>/
will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.
If you want to build fluentd using manual steps, go to STEP 1.2.
Use the following commands to build fluentd using the build script. Please make sure you have wget installed.
wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Fluentd/1.18.0/build_fluentd.sh
# Build fluentd
bash build_fluentd.sh
If the build completes successfully, go to STEP 2. In case of error, check logs
for more details or go to STEP 1.2 to follow manual build steps.
export SOURCE_ROOT=/<source_root>/
-
RHEL (8.8, 8.10)
sudo yum install wget
-
RHEL (9.2, 9.4, 9.5)
sudo yum install -y rpmdevtools zlib-devel zlib wget
-
SLES (15 SP6)
sudo zypper install -y gzip awk zlib-devel wget
-
Ubuntu (20.04, 22.04, 24.04, 24.10)
sudo apt update && sudo apt install -y zlib1g-dev wget
-
Build Ruby
wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Ruby/3.3.6/build_ruby.sh bash build_ruby.sh -y
export GEM_HOME=${HOME}/.gem/ruby
export PATH=${HOME}/.gem/ruby/bin:$PATH
Fluentd is a gem based product, so the rubygem install process will automatically build the necessary native parts
-
RHEL
gem install fluentd -v 1.18.0
-
SLES and Ubuntu
sudo gem install fluentd -v 1.18.0
Once complete it should report that a number of gems including fluentd are installed. Verify the installed version with gem list fluentd
Note: In case of error gem command not found
on SLES, run above command as sudo env PATH=$PATH gem install fluentd -v 1.18.0
.
This test is to setup/install a config directory, then start a fluent process which is put into the background. Finally a message is piped to fluent-cat
fluentd -s conf
fluentd -c conf/fluent.conf &
echo '{"json":"message"}' | fluent-cat debug.test
This should display similar to the following:
2024-08-30 08:01:06.889880635 +0000 debug.test: {"json":"message"}
If the fluent process is not running the response will be similar to the following:
connect failed: Connection refused - connect(2) for "127.0.0.1" port 24224
Note: Typing fluentd -help
gives an outline of fluentd
commands available. If it throws error fluentd command not found
, set fluentd
binary path to PATH environment variable.
The information provided in this article is accurate at the time of writing, but on-going development in the open-source projects involved may make the information incorrect or obsolete. Please open issue or contact us on IBM Z Community if you have any questions or feedback.