概要
- kibana は kibana2 と kibana3 が大きく異なるようなので kibana3 を試してみる
参考
何が違うのか?
kibana3はHTMLとJavaScriptで実装されているkibana2は Ruby(SinatraとThin)で実装されている- ということは
kibana3は適当な Web フォルダに放り込めば使えるということですな JavascriptからElasticsearchのJSONを叩く感じになるのかな...
早速試す
環境
リポジトリから git clone してくる
sudo su - kibana cd ~ git clone https://github.com/elasticsearch/kibana.git
ディレクトリ構成
以下のような構成。
kibana@debian6:~/kibana$ tree -L 1 . ├── CONTRIBUTING.md ├── Gruntfile.js ├── LICENSE.md ├── README.md ├── common ├── config.js ├── dashboards ├── index.html ├── js ├── package.json ├── panels ├── partials ├── sample └── vendor 7 directories, 7 files
config.js を確認する
初期状態の config.js は下記の通り。
/* elasticsearch: URL to your elasticsearch server. You almost certainly don't want 'http://localhost:9200' here. Even if Kibana and ES are on the same host kibana_index: The default ES index to use for storing Kibana specific object such as stored dashboards modules: Panel modules to load. In the future these will be inferred from your initial dashboard, though if you share dashboards you will probably need to list them all here If you need to configure the default dashboard, please see dashboards/default */ var config = new Settings( { // By default this will attempt to reach ES at the same host you have // elasticsearch installed on. You probably want to set it to the FQDN of your // elasticsearch host elasticsearch: "http://"+window.location.hostname+":9200", // elasticsearch: 'http://localhost:9200', kibana_index: "kibana-int", modules: ['histogram','map','pie','table','filtering', 'timepicker','text','fields','hits','dashcontrol', 'column','derivequeries','trends','bettermap','query', 'terms'], } );
初期状態の config.js は上記の状態。window.location.hostname でホスト名を取得して Elasticsearch のホストを指定する。Elasticsearch のホストが異なる場合には elasticsearch: "http://"+window.location.hostname+":9200", をコメントアウトした上で、'http://localhost:9200', を適宜修正する。
DocumentRoot 以下に放り込む
とりあえず以下のようにしてブラウザから確認出来るようにする。
cd /var/www/ sudo ln -s /home/kibana/kibana kibana
確認してみる
以下の URL にアクセスしてみる。
http://xxx.xxx.xxx.xxx/kibana/
以下のようにクールな印象。

kibana2 と kibana3 の見た目の違い
とりあえず kibana3 と kibana2 の違い。同じサーバーで二つのインターフェースで試せる。
kibana3

kibana2

ということで
kibana3はHTMLとJSONと手軽なのでElasticsearchと組み合わせることで簡単にログの視覚化が出来そうkibana3の方が機能が多いとのことなので色々と触ってみることにする