2012-01-11
■[Debian(squeeze)][Ruby][fluent]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>
上手にできましたヾ(・ω・)ノ ぱちぱち
トラックバック - http://d.hatena.ne.jp/oji4444/20120111/1326266488
