プログラミング + アカデミック + 何か面白いこと

  1. Programming
  2. 79 view

Install fluentd and try to use it on ubuntu 12.04LTS

fluentd

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"}

Programming recent post

  1. Install sbt 1.0.0 and run sample template

  2. [Machine Learning]Created docker image includ…

  3. [Node.js]How to write batch script with Node.…

  4. [Play][Scala]Develop Request Driven Batch Usi…

  5. [OpenCV][Ruby]Auto check web page design corr…

関連記事

PAGE TOP