Treasure Agent (td-agent) is a stable distribution package of Fluentd, which is maintained by Treasure Data and the Cloud Native Computing Foundation.
You can learn more about how to prepare for the installation at Fluentd Installation Guide.
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 |
- Installation Guide
- 64-bit/amd64 packages are available for Focal, Bionic, Xenial, and Debian Buster.
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.04 Focal -- td-agent 4
curl -L https://toolbelt.treasuredata.com/sh/install-ubuntu-focal-td-agent4.sh | shFor Ubuntu Bionic,
# Ubuntu 18.04 Bionic -- td-agent 4
curl -L https://toolbelt.treasuredata.com/sh/install-ubuntu-bionic-td-agent4.sh | shFor Ubuntu Xenial,
# Ubuntu 16.04 Xenial -- td-agent 4
curl -L https://toolbelt.treasuredata.com/sh/install-ubuntu-xenial-td-agent4.sh | shFor Debian Buster,
# Debian Buster -- td-agent 4
curl -L https://toolbelt.treasuredata.com/sh/install-debian-buster-td-agent4.sh | shLegacy 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 | shFor Debian Stretch,
curl -L https://toolbelt.treasuredata.com/sh/install-debian-stretch-td-agent3.sh | shFor Debian Jessie,
curl -L https://toolbelt.treasuredata.com/sh/install-debian-jessie-td-agent3.sh | shThe /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.serviceExample output:
● 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, status=0/SUCCESS)
Main PID: 53198 (fluentd)
Tasks: 2 (limit: 4915)
Memory: 19.9M
CPU: 1.251s
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.pid
└─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 /var/run/td-agent/td-agent.pidIf you want to customize systemd behavior, place your td-agent.service file in /etc/systemd/system.
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 statusExample output:
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 statusMake sure your configuration file is located at /etc/td-agent/td-agent.conf.
The logs are located under /var/log/td-agent. The daemon runs as the td-agent user and td-agent group. After you modify the config file, restart the agent.
See the Chef cookbook to automate this process.