あれ | それ |
---|---|
OS | Ubuntu 12.10 |
Ruby | ruby 2.0.0p195 (2013-05-14 revision 40734) [i686-linux] |
Java のインストール
$ aptitude install openjdk-7-jdk
ダウンロード&インストール
$ curl -O 'https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.5.deb'
$ sudo dpkg -i elasticsearch-0.90.5.deb
実行
$ sudo service elasticsearch start
$ git clone --branch=kibana-ruby https://github.com/rashidkpc/Kibana.git
$ cd Kibana
$ bundle install
Host の変更
$ vi KibanaConfig.rb
-KibanaHost = '127.0.0.1'
+KibanaHost = '0.0.0.0'
実行
$ ruby kibana.rb
$ cd fluentd
$ vi fluentd.conf
# fluentd.conf
<source>
type tail
format ltsv
path /path/to/access_log
pos_file /path/to/access_log.pos
tag access_log
</source>
<match access_log>
type elasticsearch
index_name adminpack
type_name apache
include_tag_key true
tag_key @log_name
host localhost
port 9002
logstash_format true
flush_interval 10s
</match>
実行
$ fluentd -c fluentd.conf