Target
Install fluentd and try to make it output what is echo output.
Install Fluentd
$ sudo apt-add-repository 'deb http://packages.treasure-data.com/debian/ lucid contrib'
$ sudo apt-get update
$ sudo apt-get install td-agent
$/usr/lib/fluent/ruby/bin/fluentd --version
fluentd 0.10.39
Config File Setting
$ sudo mkdir /etc/td-agent/conf
$ sudo vim /etc/td-agent/conf/test.conf
# Standard Input
<source>
type forward
</source>
# Output File
<match debug.**>
type file
path /var/log/td-agent/debug
</match>
Start Script Setting
="/usr/lib/fluent/ruby/lib/ruby/gems/1.9.1/"
3 ENV["GEM_PATH"]="/usr/lib/fluent/ruby/lib/ruby/gems/1.9.1/"
< 4 ENV["FLUENT_CONF"]="/etc/td-agent/td-agent.conf"
---
> 4 ENV["FLUENT_CONF"]="/etc/td-agent/conf/test.conf"
5 ENV["FLUENT_PLUGIN"]="/etc/td-agent/plugin"
6 ENV["FLUENT_SOCKET"]="/var/run/td-agent/td-agent.sock"
7 load "/usr/lib/fluent/ruby/bin/fluentd"
Start
$ sudo /etc/init.d/td-agent restart
$ echo '{"test":"message"}' | fluent-cat debug.test
$ cat /var/log/td-agent/debug.20131006.b4e80c93fc8c29d46
2013-10-06T06:23:46+00:00 debug.test {"test":"message"}