Installing td-agent for Redhat and CentOS

What's td-agent?

td-agent is a stable distribution package of fluentd, which is maintained by Treasure Data, Inc.

The installation from Ruby gem has some difficulties for the normal users, so we've decided to create the distribution for more ease of installation, and use. The detailed difference between fluentd and td-agent can be found here.

Prerequisites

It's HIGHLY RECOMMENDED to setup ntpd on the nodes to sync the clock. Otherwise the logs could contain invalid timestamps.

Installation

This article shows how to install td-agent for CentOS, RHEL 5.0+.

At first, please create /etc/yum.repos.d/td.repo with the following contents.

[treasuredata]
name=TreasureData
baseurl=http://packages.treasure-data.com/redhat/$basearch
gpgcheck=0

Then, you can install via yum command.

$ yum update
$ yum install td-agent
$ /etc/init.d/td-agent start

/etc/init.d/td-agent script is also provided to start, stop, or restart the agent.

$ /etc/init.d/td-agent start
$ /etc/init.d/td-agent stop
$ /etc/init.d/td-agent restart

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, please restart the agent.

Cookbook

We're providing OpsCode chef cookbook, to automate this process. Please have a look at it.

Other Resources

The ChangeLog for td-agent is available here.

For those who are using TreasureData Hadoop-based cloud data warehousing, please refer this document.