Drop schedule announcement about EOL of Treasure Agent (td-agent) 4

Hi users and developers!

We announce the dropping schedule for TD Agent 4 development.

About Treasure Agent (td-agent) 4

Since td-agent 4.0.0 was released in 2020, td-agent 4 has been maintained for a long time.

As new major version of td-agent 4 was rebranded (to fluent-package v5), and released in August 2023, we decided to stop maintaining td-agent 4.

Scheduled end of life - Dec 2023

As you know, already stepping down maintenance activity, new minor update for td-agent 4 will not be shipped anymore. (td-agent v4.5.1 will be the last release of this series, it will be shipped in this month.)

Thus, we recommend using fluent-package v5 for new deployment :)

How to migrate to Fluent Package v5

There is a good article to do it.

Follow the above instructions.

Read More

Scheduled support lifecycle announcement about Fluent Package

Hi users!

We have released fluent-package v5.0.0 (Release Candidate) and the following v5.0.1 (General Availability). fluent-package is formerly known as td-agent and a stable distribution package of Fluentd.

In this blog article, we explains why the concept of channels is introduced.

Why is LTS (Long Term Support) channel introduced?

In the previous versions, td-agent was shipped as quarterly releases in most cases. It sometimes contains fluentd minor upgrade occasionally, which means that not only bug or security fixes, but also contains new features. As a result, there was a case that the stability was affected unexpectedly.

In point view of adopting fluentd (and td-agent) for enterprise services, there was a requirement for the distribution which contains security or bug fixes only and scheduled lifecycle of it.

The LTS release is the answer to support them.

Channels for updates

There are two channels of support lifecycle.

  • Normal release
  • LTS (Long Term Support)

Here is the difference of these channels.

  • Normal release (5.x series)
    • Recommended for early adopters (eager to try new features of Fluentd)
    • Rapid release development (planned semi-annually releases, but it may vary.)
    • Fluentd will be upgraded occasionally
      • Minor upgrade will be applied. e.g. 1.16 => 1.17 and so on.
      • e.g. v5.0.1 (Fluentd v1.16.2), v5.0.2 (Fluentd v1.16.3), ... v5.1.0 (Fluentd v1.17.0)
    • The only latest version will be supported (bug fix will not be backported into older version)
  • LTS (Long Term Support, 5.0.x series)
    • Recommended for enterprise services
    • Security and bug fix release only
    • Fluentd will be upgraded only in the teeny version and will stick to 1.16.x series.
      • Thus, the version number will be 5.0.x. (5.1 series will not be shipped)
      • e.g. v5.0.1 (Fluentd v1.16.2), v5.0.2 (Fluentd v1.16.3), v5.0.3 (Fluentd v1.16.4) ... v5.0.x (Fluentd v1.16.x)
    • Next major version will be fluent-package v6.0.0, and will be shipped in 2025.

As for fluent-package v5,

  • fluent-package v5 LTS will be supported until March, 2025 (Even though Ruby 3.2 is still supported)
  • Until 5.1.0 is released, normal release channel and LTS channel are the same package.

Current releases and future plans:

Release Version Release Date End of life
v4.5.1 Aug, 2023 Dec, 2023
v5.0.1 (LTS) Aug 29, 2023 March, 2025
v6.0.0 (LTS) March, 2025? (T.B.D.) T.B.D.

Happy logging!

Read More

Upgrade to fluent-package v5

fluent-package "v5" is available since August 2023. fluent-package is the successor of td-agent "v4".

In this post, we will share the steps we've tested and hopefully this will help your experience from v4 to v5.

Why package was renamed?

fluent-package was formerly known as td-agent. In the past, Treasure Data, Inc took the initiative to provide the package, but now the Fluentd community does it. This is why the package name was changed.

To represent "All in one package of Fluentd which contains Fluentd and related gem packages", the package name was changed to fluent-package.

Even though package name was changed, Treasure Data, Inc still sponsor the package delivery resources.

Which channel should I use?

There are two channels for fluent-package.

  • Normal release version
  • Long Term Support version

One is normal release version which will be updated regularly - rapid release development style (td-agent v4 was released like this in almost every quarter). In this version, fluentd will be eventually updated to newer minor version (e.g. 1.17.x and so on)

The other is a more conservative maintenance version (Long Term Support) which will not introduce a new feature. It only applies teeny update such as security or bug fix only. LTS for v5 will be supported until March, 2025.

More details about difference between normal release version and LTS version will be explained in Scheduled support lifecycle announcement about Fluent Package.

Differences between td-agent v4 and fluent-package v5

In the fluent-package v5, core components like ruby (2.7.8 -> 3.2.2) and OpenSSL (1.1.1 -> 3.1.0 for Windows, 3.0.8 for macOS) were updated.

The major changes are as follows.

  • td-agent command is renamed to fluentd.
    • $ td-agent --version -> $ fluentd --version
  • td-agent-gem command is renamed to fluent-gem.
    • $ td-agent-gem list -> $ fluent-gem list
  • The service name for non-Windows td-agent is renamed to fluentd.
    • $ systemctl status td-agent -> $ systemctl status fluentd

With the change of package name, install path, service name (e.g. /opt/fluent, fluentd.service) and so on were also changed. Basically, for td-agent v4 users, it aims to keep compatibility as far as possible by executing the migration process with copying old files or providing symbolic links for it.

If you want to know the details of upgraded components, see CHANGELOG.md.

NOTE: We explain for platform specific issue as "Additional hints for v4 users" section below.

Upgrade steps

During the upgrade process, plugins bundled in td-agent are automatically upgraded. With that being said, other plugins added on your own are not included. You should review if you need to upgrade plugins since some directory structures from v4 and v5 are changed.

In this post, I will show steps with plugins added on my own, "fluent-plugin-concat" for instance. Here is sample configuration file I used through steps.

<filter docker.log>
  @type concat
  key message
  multiline_start_regexp /^Start/
</filter>

1. Review what plugins are installed together with td-agent v4.

$ td-agent-gem list | grep fluent-plugin*
fluent-plugin-calyptia-monitoring (0.1.3)
fluent-plugin-concat (2.5.0)
fluent-plugin-elasticsearch (5.3.0)
fluent-plugin-flowcounter-simple (0.1.0)
fluent-plugin-kafka (0.19.0)
fluent-plugin-metrics-cmetrics (0.1.2)
fluent-plugin-opensearch (1.1.0)
fluent-plugin-prometheus (2.0.3)
fluent-plugin-prometheus_pushgateway (0.1.0)
fluent-plugin-record-modifier (2.1.1)
fluent-plugin-rewrite-tag-filter (2.4.0)
fluent-plugin-s3 (1.7.2)
fluent-plugin-sd-dns (0.1.0)
fluent-plugin-systemd (1.0.5)
fluent-plugin-td (1.2.0)
fluent-plugin-utmpx (0.5.0)
fluent-plugin-webhdfs (1.5.0)

You can also find installed plugins under /opt/td-agent/lib/ruby/gems/2.7.0/gems/ directories.

$ ls -l /opt/td-agent/lib/ruby/gems/2.7.0/gems |grep fluent-plugin*
drwxr-xr-x. 5 root root  175  7月 14 03:01 fluent-plugin-calyptia-monitoring-0.1.3
drwxr-xr-x. 4 root root  206  7月 14 03:03 fluent-plugin-concat-2.5.0
drwxr-xr-x. 5 root root 4096  7月 14 03:01 fluent-plugin-elasticsearch-5.3.0
drwxr-xr-x. 4 root root  205  7月 14 03:01 fluent-plugin-flowcounter-simple-0.1.0
drwxr-xr-x. 6 root root  191  7月 14 03:01 fluent-plugin-kafka-0.19.0
drwxr-xr-x. 5 root root  190  7月 14 03:01 fluent-plugin-metrics-cmetrics-0.1.2
drwxr-xr-x. 5 root root 4096  7月 14 03:01 fluent-plugin-opensearch-1.1.0
drwxr-xr-x. 5 root root  215  7月 14 03:01 fluent-plugin-prometheus-2.0.3
drwxr-xr-x. 6 root root  238  7月 14 03:01 fluent-plugin-prometheus_pushgateway-0.1.0
drwxr-xr-x. 4 root root  176  7月 14 03:01 fluent-plugin-record-modifier-2.1.1
drwxr-xr-x. 3 root root  210  7月 14 03:01 fluent-plugin-rewrite-tag-filter-2.4.0
drwxr-xr-x. 5 root root  230  7月 14 03:01 fluent-plugin-s3-1.7.2
drwxr-xr-x. 3 root root  170  7月 14 03:01 fluent-plugin-sd-dns-0.1.0
drwxr-xr-x. 3 root root   49  7月 14 03:01 fluent-plugin-systemd-1.0.5
drwxr-xr-x. 5 root root  221  7月 14 03:01 fluent-plugin-td-1.2.0
drwxr-xr-x. 5 root root  166  7月 14 03:01 fluent-plugin-utmpx-0.5.0
drwxr-xr-x. 4 root root  191  7月 14 03:01 fluent-plugin-webhdfs-1.5.0

2. Stop td-agent v4 daemon.

$ sudo systemctl stop td-agent

Even though fluent-package supports upgrade without stopping service, but recommend to stop explicitly.

3. Run installation script of fluent-package v5.

When you use RedHat or derivative distributions, you can run following script if you want to install normal release version of fluent-package.

# curl -L https://toolbelt.treasuredata.com/sh/install-redhat-fluent-package5.sh | sh

When you use RedHat or derivative distributions, you can run following script if you want to install LTS (Long term support) version of fluent-package.

# curl -L https://toolbelt.treasuredata.com/sh/install-redhat-fluent-package5-lts.sh | sh

You can find more information about the installation script in Fluend Doc - Installation.

4. Confirm if fluent-package v5 is properly installed.

$ LANG=C yum info fluent-package
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.riken.jp
 * extras: ftp.riken.jp
 * updates: ftp.riken.jp
Installed Packages
Name        : fluent-package
Arch        : x86_64
Version     : 5.0.0
Release     : 1.el7
Size        : 64 M
Repo        : installed
From repo   : /fluent-package-5.0.0-1.el7.x86_64
Summary     : The stable distribution of Fluentd
URL         : https://www.treasuredata.com/
License     : ASL 2.0
Description : The stable distribution of Fluentd, called td-agent.

5. Reload fluent-package daemon.

$ sudo systemctl daemon-reload
$ sudo systemctl enable --now fluentd

6. Check installed plugins.

$ fluent-gem list |grep fluent-plugin*
fluent-plugin-calyptia-monitoring (0.1.3)
fluent-plugin-elasticsearch (5.3.0)
fluent-plugin-flowcounter-simple (0.1.0)
fluent-plugin-kafka (0.19.0)
fluent-plugin-metrics-cmetrics (0.1.2)
fluent-plugin-opensearch (1.1.0)
fluent-plugin-prometheus (2.0.3)
fluent-plugin-prometheus_pushgateway (0.1.0)
fluent-plugin-record-modifier (2.1.1)
fluent-plugin-rewrite-tag-filter (2.4.0)
fluent-plugin-s3 (1.7.2)
fluent-plugin-sd-dns (0.1.0)
fluent-plugin-systemd (1.0.5)
fluent-plugin-td (1.2.0)
fluent-plugin-utmpx (0.5.0)
fluent-plugin-webhdfs (1.5.0)

You can see bundled plugins are upgraded as well but can not find plugins added on your own. In this post, added plugin was "fluent-plugin-concat" and it is not shown in installed list.

7. Install plugins added on my own.

$ sudo fluent-gem install fluent-plugin-concat
$ fluent-gem list | grep fluent-plugin*
fluent-plugin-calyptia-monitoring (0.1.3)
fluent-plugin-concat (2.5.0)
fluent-plugin-elasticsearch (5.3.0)
fluent-plugin-flowcounter-simple (0.1.0)
fluent-plugin-kafka (0.19.0)
fluent-plugin-metrics-cmetrics (0.1.2)
fluent-plugin-opensearch (1.1.0)
fluent-plugin-prometheus (2.0.3)
fluent-plugin-prometheus_pushgateway (0.1.0)
fluent-plugin-record-modifier (2.1.1)
fluent-plugin-rewrite-tag-filter (2.4.0)
fluent-plugin-s3 (1.7.2)
fluent-plugin-sd-dns (0.1.0)
fluent-plugin-systemd (1.0.5)
fluent-plugin-td (1.2.0)
fluent-plugin-utmpx (0.5.0)
fluent-plugin-webhdfs (1.5.0)

As for fluent-package v5, "fluent-plugin-concat" was installed under "/opt/fluent/lib/ruby/gems/3.2.0/gems/" directories.

$ ls -l /opt/fluent/lib/ruby/gems/3.2.0/gems/ |grep fluent-plugin*
drwxr-xr-x.  5 root root  175  7月 14 03:14 fluent-plugin-calyptia-monitoring-0.1.3
drwxr-xr-x.  4 root root  206  7月 14 03:16 fluent-plugin-concat-2.5.0
drwxr-xr-x.  5 root root 4096  7月 14 03:14 fluent-plugin-elasticsearch-5.3.0
drwxr-xr-x.  4 root root  205  7月 14 03:14 fluent-plugin-flowcounter-simple-0.1.0
drwxr-xr-x.  6 root root  191  7月 14 03:14 fluent-plugin-kafka-0.19.0
drwxr-xr-x.  5 root root  190  7月 14 03:14 fluent-plugin-metrics-cmetrics-0.1.2
drwxr-xr-x.  5 root root 4096  7月 14 03:14 fluent-plugin-opensearch-1.1.0
drwxr-xr-x.  5 root root  215  7月 14 03:14 fluent-plugin-prometheus-2.0.3
drwxr-xr-x.  6 root root  238  7月 14 03:14 fluent-plugin-prometheus_pushgateway-0.1.0
drwxr-xr-x.  4 root root  176  7月 14 03:14 fluent-plugin-record-modifier-2.1.1
drwxr-xr-x.  3 root root  210  7月 14 03:14 fluent-plugin-rewrite-tag-filter-2.4.0
drwxr-xr-x.  5 root root  230  7月 14 03:14 fluent-plugin-s3-1.7.2
drwxr-xr-x.  3 root root  170  7月 14 03:14 fluent-plugin-sd-dns-0.1.0
drwxr-xr-x.  3 root root   49  7月 14 03:14 fluent-plugin-systemd-1.0.5
drwxr-xr-x.  5 root root  221  7月 14 03:14 fluent-plugin-td-1.2.0
drwxr-xr-x.  5 root root  166  7月 14 03:14 fluent-plugin-utmpx-0.5.0
drwxr-xr-x.  4 root root  191  7月 14 03:14 fluent-plugin-webhdfs-1.5.0

8. Start fluent-package v5 daemon.

$ sudo systemctl start fluentd

9. Check if there are no error messages in fluentd logs.

$ tail -100f /var/log/fluent/fluentd.log

Now, upgrading steps are completed. Happy Logging!

Additional hints for v4 users

For Debian/Ubuntu

  • fluentd-apt-source package will be marked as a transitional package. you can remove it safely with sudo apt purge fluentd-apt-source.
  • If you want to enable td-agent.service, you must explicitly execute the following commands:
  $ sudo systemctl unmask td-agent
  $ sudo systemctl enable fluentd

For RHEL

  • If you want to enable td-agent.service, you must explicitly execute the following command:
  $ sudo systemctl enable fluentd

For Windows

  • fluent-package installer was changed not to start service by default. If you want to start fluentd as a service, execute the following command with administrator privileges.
  c:\opt\fluent> net start fluentdwinsvc

For macOS

WARNING: Currently we have no plan to officially support dmg version of fluent-package yet. It is just modified to be a minimally buildable state, it is for testing purpose only.

Read More

td-agent v4.5.0 has been released

Hi users!

We have released td-agent v4.5.0. td-agent is a stable distribution package of Fluentd.

Changes from td-agent v4.4.2

  • Update bundled Ruby to 2.7.8 which is the last version of Ruby 2.7 series.
    • Only for RHEL 9 & Ubuntu 22.04 jammy, we updat Ruby to 3.1.4 exceptionally.
  • Update fluentd to 1.16.1
  • Update plugins
    • fluent-plugin-kafka 0.19.0
    • fluent-plugin-elasticsearch 5.3.0
    • fluent-plugin-opensearch 1.1.0
  • Drop Debian buster support

About next major version

We are preparing next major version of td-agent which bundles Ruby 3.2. It's still work in progerss, we'll announce it as soon as we are ready for it.

Please note that the package name will be changed to fluent-package. Please see the following discussion for more detail: https://github.com/fluent/fluentd/discussions/3860

Download

Please see the download page.

Read More

Fluentd v1.16.1 has been released

Hi users!

We have released v1.16.1 on 2023-04-17. ChangeLog is here.

In the previous version v1.16.0, there was a bug that caused Fluentd to fail to start with certain secondary configurations. In this release, we fixed that problem and added a new feature of in_tcp. And other some improvements!

Enhancement

  • in_tcp: Add message_length_limit to drop large incoming data. #4137

Bug Fixes

out_secondary_file: Fix NameError of SecondaryFileOutput when setting other secondaries

In the previous version v1.16.0, there was a bug that if you set another secondary without ever setting out_secondary_file, Fluentd fails to start with the following error.

/path/to/fluentd/lib/fluent/plugin/output.rb:429:in `configure': uninitialized constant Fluent::Plugin::Output::SecondaryFileOutput (NameError)

          if (@secondary.class != SecondaryFileOutput) &&
                                  ^^^^^^^^^^^^^^^^^^^

In this release, we fixed this problem.

See #4124 for more information.

Buffer: Fix that compress setting causes unexpected error when receiving already compressed MessagePack

With this release, it is now possible that Fluentd forwards already compressed MessagePack data to another Fluentd as is (without decompressing).

A possible use case is two-stage forwarding.

Forwarder1(out_forward) -> Forwarder2(in_forward, out_forward) -> Aggregator(in_forward)

In this case, Forwarder2 should process the data of CompressedMessagePackEventStream as is (without decompressing) and re-forward the data to Aggregator.

Until this version, a bug prevented us from setting Forwarder2's compress gzip of out_forward or buffer. It resulted in the following error.

[error]: #0 unexpected error on reading data host="..." port=... error_class=ArgumentError error="unknown keyword: :packer"

So we had no choice but to decompress and forward it from Forwarder2 to Aggregator.

With this release, we can now set compress gzip for Forwarder2!

See #4146 and #4147 for more information.

Others

  • Server helper: Suppress error of UDPServer over max_bytes on Windows. #4131

Enjoy logging!

Read More

Fluentd v1.16.0 has been released

Hi users!

We have released v1.16.0 on 2023-03-29. ChangeLog is here.

This release is a new release of v1.16 series. In this release, we enhanced the feature for chunk file corruption and fixed some bugs, mainly about logging and race condition errors.

Enhancement

Backup corrupted chunk files at resuming

Some chunk files in buffer_file or buffer_file_single are possibly corrupted after Fluentd stopped abnormally, such as due to a power failure.

Fluentd has a feature to backup unrecoverable chunks as before. However, when Fluentd resumes, remaining corrupted chunk files were just deleted.

Since this release, Fluentd also backups those files at resuming. In addition, Fluentd outputs some useful logs about possibly corrupted chunk files due to an abnormal termination.

Please see the document and the following PRs for more information.

in_tcp: Add send_keepalive_packet option

Since this release, you can use send_keepalive_packet option for in_tcp, as well as in_forward or in_syslog.

Please see the document and #3961 for more information.

Bug Fixes

  • out_secondary_file: Fix race condition. #4081
  • out_secondary_file: Suppress warning using different secondary for outsecondaryfile. #4087
  • out_forward: Fix error of ack handling conflict with require_ack_response. #4030
  • Windows: Fix bug that Fluentd sometimes tries to use an unavailable port and fails to start. #4092
  • Windows: Fix bug that flushing or graceful reloading cause reopening wrong log file. #4054
  • Fix not to log some initial messages without format setting applied. #4091
  • Fix bug that some system configs are not reflected. #4064, #4065
  • Non-Windows: Fix not to generate sigdump file after receiving SIGTERM. #4043
  • Fix bug that system_config.workers value can be wrongly 1 at config check at startup. #4066
  • Fix bug that a variable whose type is not Fluent::Config::Element can be passed to Fluent::Plugin::Base::configure(). #4066

Enjoy logging!

Read More

Fluentd v1.15.3 has been released

Hi users!

We have released v1.15.3 on 2022-11-02. ChangeLog is here.

In this release, we fixed several bugs.

Bug Fixes

out_file: Fix the multi-worker check with <worker N-M> directive

In the v1.15.1, we added a new feature to prevent write conflicts between multiple workers.

However, this fix didn't work correctly with <worker N-M> directive.

With this setting, the configuration check before starting the supervisor mistakenly determines that the setting of out_file is invalid and causes Fluentd to terminate.

In this release, we fixed this problem.

See #3942 for more information.

Fix log rotation on Windows

We can configure log rotation setting as follows.

On Windows, the log files must be separated by each process.

NOTE: When --log-rotate-age is specified on Windows, log files are separated into log-supervisor-0.log, log-0.log, ..., log-N.log where N is generation - 1 due to the system limitation. Windows does not permit delete and rename files simultaneously owned by another process.

However, that log rotation setting in the system-directive didn't satisfy this and Fluentd outputted the logs of the supervisor process into the log file of the worker-0 process.

This could cause errors during log rotation.

In this release, we fixed this problem.

See #3939 for more information.

Support glob for !include directive in YAML config format

In the v1.15.0, we supported YAML config format.

However, handling glob of !include directive was leaked.

In this release, we supported it.

See #3917 for more information.

Remove meaningless and unsecure oj options

In this release, we removed the following oj options.

  • FLUENT_OJ_OPTION_MODE=object
  • FLUENT_OJ_OPTION_MAX_NESTING

FLUENT_OJ_OPTION_MODE=object was unsecure, so we removed it.

This option is not used unless a user explicitly sets the environmental variable, so almost all users do not need to care about this vulnerability.

FLUENT_OJ_OPTION_MAX_NESTING was not supported, so we removed it.

See #3929 for more information.

Enjoy logging!

Read More

td-agent v4.4.2 has been released

Hi users!

We have released td-agent v4.4.2. td-agent is a stable distribution package of Fluentd.

Changes from td-agent v4.4.1

  • Update fluentd to 1.15.3
    • Fix log initializer to correctly create per-process files on Windows
    • out_file: Fix the multi-worker check with <worker 0-N> directive
    • Remove meaningless oj options
    • Support glob for !include directive in YAML config format
  • macOS: Support Apple Silicon
  • Update plugins
    • fluent-plugin-elasticsearch 5.2.4
    • fluent-plugin-opensearch 1.0.8
    • fluent-plugin-s3 1.7.2
    • fluent-plugin-windows-eventlog 0.8.2

Download

Please see the download page.

Read More

td-agent v4.4.1 has been released

Hi users!

We have released td-agent v4.4.1. td-agent is a stable distribution package of Fluentd.

Changes from td-agent v4.4.0

  • Update fluentd to 1.15.2
  • Update fluent-plugin-kafka to 0.18.1
    • Fix outkafka2 doesn't respect `chunklimitrecordsandchunklimit_size`

Download

Please see the download page.

Read More

Fluentd v1.15.2 has been released

Hi users!

We have released v1.15.2. ChangeLog is here.

In this release, we fixed the problem that out_file's append mode with --daemon flag failed to flush the buffer.

Bug Fixes

out_file: Fix append mode with --daemon flag

In the previous version v1.15.1, we added a new feature to prevent write conflicts between multiple workers.

However, this fix didn't work correctly with --daemon flag of Fluentd command.

With that flag, out_file in the append mode fails to flush the buffer. This is a critical bug for td-agent, because td-agent uses --daemon flag by default.

In this release, we fixed this problem.

See #3864 for more information.

Miscellaneous fixes

  • Add a new system configuration enable_jit. #3857
  • child_process: Plug file descriptor leak. #3844
  • Drop win32-api gem to support Ruby 3.2. #3849, #3866

Enjoy logging!

Read More

About Fluentd

Fluentd is an open source data collector to simplify log management.

Learn

Want to learn the basics of Fluentd? Check out these pages.

Ask the Community

Couldn't find enough information? Let's ask the community!

Ask the Experts

You need commercial-grade support from Fluentd committers and experts?

Follow Us!