Fluentd

Send logs to Timber via FluentD

If possible, we recommend using Fluent Bit for its superior performance.

Fluentd is a general purpose log forwarder that can forward logs from multiple sources to Timber. You can use Fluentd to send logs to your Timber account.

Installation

  1. Install Fluentd, following instructions for your desired platform.

  2. Install the appropriate FluentD input plugins.

  3. Install the Timber Fluentd output plugin:

    gem install fluent-plugin-timber
  4. In /etc/td-agent/td-agent.conf , configure the Timber output, eeplace YOUR_API_KEY and YOUR_SOURCE_ID accordingly:

    /etc/td-agent/td-agent.conf
    <match *> # will match all inputs; replace with a scope to send subset (https://docs.fluentd.org/v1.0/articles/config-file#(2)-%E2%80%9Cmatch%E2%80%9D:-tell-fluentd-what-to-do!)
    @type timber
    api_key YOUR_API_KEY
    source_id YOUR_SOURCE_ID
    </match>
  5. Optionally install plugins to capture context for your platform. For example, the EC2 and and Kubernetes plugins.

  6. Restart the Fluentd agent:

    sudo service td-agent restart

Configuration

Please refer to the FluentD configuration documentation.

FAQs

Should I use FluentD or Fluent Bit?

You can read more about both utilities in the FluentD docs. In general, we recommend Fluent Bit when possible due to its improved performance. FluentD should be used in situations where Fluent Bit is not sufficient. For example, if you want to collect data from a source that Fluent Bit does not support, or you want to use a FluentD plugin that is not available in Fluent Bit.

Troubleshooting

To begin, please see our log delivery troubleshooting guide. This covers the most common issues we see with log delivery:

If the above troubleshooting guide does not resolve your issue we recommend enabling FluentD logging and analyzing log activity to understand how FluentD is functioning. Please refer to FluentD's logging documentation, you'll want to set the log level to debug to ensure you're getting all events.