Hatena::ブログ(Diary)

七味大福 このページをアンテナに追加 RSSフィード

2012-01-11

[][][]Debian に fluent をインストール

fluentインストール時のメモ書き

Debianパッケージのstableにruby1.9.3が無かったので、testingからインストールする事にした

# vim /etc/apt/sources.list

#deb http://cdn.debian.or.jp/debian/ stable main contrib non-free
deb http://cdn.debian.or.jp/debian/ testing main contrib non-free

# apt-get update
# apt-cache search ruby1.9.3
ruby1.9.3 - Interpreter of object-oriented scripting language Ruby, version 1.9.3

# apt-get install ruby1.9.3

# ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [i486-linux]


そしてfluentdのインストール

# gem install fluentd

# gem list

*** LOCAL GEMS ***

cool.io (1.0.0)
fluentd (0.10.8)
http_parser.rb (0.5.3)
iobuffer (1.0.0)
json (1.6.4)
msgpack (0.4.6)
yajl-ruby (1.0.0)

設定ファイル作成

# fluentd --setup /etc/fluent
Installed /etc/fluent/fluent.conf.

とりあえず、access_logからtailしてみる

# vim /etc/fluent/fluent.conf

## File input
## read apache logs with tag=apache.access
<source>
  type tail
  format apache
  path /var/log/apache2/access_log
  tag apache.access
</source>

## match tag=apache.access and write to file
<match apache.access>
  type file
  path /var/log/fluent/access_log
</match>

上手にできましたヾ(・ω・)ノ ぱちぱち

スパム対策のためのダミーです。もし見えても何も入力しないでください
ゲスト


画像認証