Treasure Agent (td-agent) is a stable distribution package of Fluentd, which is maintained by Treasure Data and the Cloud Native Computing Foundation.
Before Installation
You can learn more about how to prepare for the installation at Fluentd Installation Guide.
Install or Upgrade td-agent
You can install or upgrade from a previous version using the following methods. We recommend the latest version of td-agent, which can be downloaded from the www.fluentd.org website.
Learn more about how this version compares to earlier versions.
Platform | Platform Version | Package or Installer |
Ubuntu/Debian | 2.6+ Linux kernel (64-bit) | td-agent v4 |
td-agent4
We currently provide td-agent4.x packages for Ubuntu Focal, Bionic, Xenial, and Debian Buster.
A shell script is provided to automate the installation process for each version. The shell script registers a new apt repository at /etc/apt/sources.list.d/treasure-data.list
and installs the td-agent
deb package.
For Ubuntu Focal,
# Ubuntu 20.4 Focal -- td-agent4 $ curl -L https://toolbelt.treasuredata.com/sh/install-ubuntu-focal-td-agent4.sh | sh
For Ubuntu Bionic,
# Ubuntu 18.4 Bionic -- td-agent4 $ curl -L https://toolbelt.treasuredata.com/sh/install-ubuntu-bionic-td-agent4.sh | sh
For Ubuntu Xenial,
# Ubuntu 16.04 Xenial -- td-agent4 $ curl -L https://toolbelt.treasuredata.com/sh/install-ubuntu-xenial-td-agent4.sh | sh
For Debian Buster,
# Debian Buster $ curl -L https://toolbelt.treasuredata.com/sh/install-debian-buster-td-agent4.sh | sh
td-agent3
Legacy td-agent3.x is available for EOL versions Ubuntu Trusty, Debian Stretch, and Debian Jessie.
A shell script is provided to automate the installation process for each version. The shell script registers a new apt repository at /etc/apt/sources.list.d/treasure-data.list and installs the td-agent deb package.
These commands set up td-agent package for you:
For Ubuntu Trusty,
$ curl -L https://toolbelt.treasuredata.com/sh/install-ubuntu-trusty-td-agent3.sh | sh
For Debian Stretch,
$ curl -L https://toolbelt.treasuredata.com/sh/install-debian-stretch-td-agent3.sh | sh
For Debian Jessie,
$ curl -L https://toolbelt.treasuredata.com/sh/install-debian-jessie-td-agent3.sh | sh
Launch Daemon by systemd
The /lib/systemd/system/td-agent script is provided to start, stop, or restart the agent.
$ sudo systemctl start td-agent.service $ sudo systemctl status td-agent.service ● td-agent.service - td-agent: Fluentd based data collector for Treasure Data Loaded: loaded (/lib/systemd/system/td-agent.service; disabled; vendor preset: enabled) Active: active (running) since Thu 2017-12-07 15:12:27 PST; 6min ago Docs: https://docs.treasuredata.com/articles/td-agent Process: 53192 ExecStart = /opt/td-agent/embedded/bin/fluentd --log /var/log/td-agent/td-agent.log --daemon /var/run/td-agent/td-agent.pid (code = exited, statu Main PID: 53198 (fluentd) CGroup: /system.slice/td-agent.service ├─53198 /opt/td-agent/embedded/bin/ruby /opt/td-agent/embedded/bin/fluentd --log /var/log/td-agent/td-agent.log --daemon /var/run/td-agent/td-agent └─53203 /opt/td-agent/embedded/bin/ruby -Eascii-8bit:ascii-8bit /opt/td-agent/embedded/bin/fluentd --log /var/log/td-agent/td-agent.log --daemon /v Dec 07 15:12:27 ubuntu systemd[1]: Starting td-agent: Fluentd based data collector for Treasure Data... Dec 07 15:12:27 ubuntu systemd[1]: Started td-agent: Fluentd based data collector for Treasure Data.
If you want to customize systemd behavior, put your td-agent.service into /etc/systemd/system
Launch Daemon by init.d
The /etc/init.d/td-agent script is provided to start, stop, or restart the agent.
$ sudo /etc/init.d/td-agent restart $ sudo /etc/init.d/td-agent status td-agent (pid 21678) is running...
The following commands are supported:
$ sudo /etc/init.d/td-agent start $ sudo /etc/init.d/td-agent stop $ sudo /etc/init.d/td-agent restart $ sudo /etc/init.d/td-agent status
Make sure your configuration file is located at /etc/td-agent/td-agent.conf.
The logs are located under /var/log/td-agent. The daemon is running in td-agent user and td-agent group.
The config file is located at /etc/td-agent/td-agent.conf. After its modification, restart the agent.
Cookbook
See the OpsCode chef cookbook, to automate this process. Refer to: https://github.com/treasure-data/chef-td-agent.
Other Resources
The ChangeLog for td-agent.
Continuous Data Import with td-agent