Send logs to Better Stack using Fluentd

Start logging to Better Stack

1. Install

Install Fluentd  on your server.

2. Set up inputs

Install and set up Fluentd input plugins .

3. Install Better Stack

Install the Better Stack Fluent plugin using td-agent-gem:

Install Logtail gem
td-agent-gem install fluent-plugin-logtail

Not using td-agent to install Fluentd?

Install the plugin with fluent-gem install fluent-plugin-logtail.
Read more about Plugin Management .

4. Set up outputs

Modify the Fluentd configuration to send logs to Better Stack:

Output configuration
<match *>
  @type logtail
  @id output_logtail
  source_token $SOURCE_TOKEN
  flush_interval 2 # in seconds
</match>

5. Restart

Restart the Fluentd service:

Restart the service
sudo systemctl restart td-agent.service

You should see your logs in Better Stack → Live tail .

Need help?

Please let us know at hello@betterstack.com.
We're happy to help! 🙏