こんにちは! JQです。
前回は『SDK編~ruby SDKでスナップショットコピー~』ということで、lsyncdを利用して別サーバ間で自動同期処理をしてみました。
今回は『OSS編~Fluented & Elasticseach & Kibana パート③~』と題して、Kibana3を触ってみたいと思います。
インストール
1.準備
Kibana以外のインストールに関しては以前の記事をご参考下さい。
■OSS編~Fluented & Elasticsearch & Kibana パート①~
■OSS編~Fluented & Elasticsearch & Kibana パート②~
2.Kibana3のインストール
Kibana3をインストールしてみます。
Kibana3はHTML+JavaScriptで構成されており、WEBサーバからも利用できます。
1 2 3 4 5 6 7 8 9 10 11 |
# wget http://download.elasticsearch.org/kibana/kibana/kibana-latest.zip --2014-01-09 19:21:40-- http://download.elasticsearch.org/kibana/kibana/kibana-latest.zip Resolving download.elasticsearch.org (download.elasticsearch.org)... 54.243.96.119, 54.225.247.240, 2406:da00:ff00::36f3:6077, ... Connecting to download.elasticsearch.org (download.elasticsearch.org)|54.243.96.119|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1087568 (1.0M) [application/zip] Saving to: ‘kibana-latest.zip’ 100%[======================================================================================================================================================================================>] 1,087,568 541KB/s in 2.0s 2014-01-09 19:21:43 (541 KB/s) - ‘kibana-latest.zip’ saved [1087568/1087568] # unzip -d /var/www/html/ kibana-latest.zip |
内容を確認してみます。
1 2 3 4 5 6 7 8 9 10 11 12 |
# ll kibana-latest/ total 40 drwxr-xr-x 6 root root 4096 Jan 9 19:22 app -rw-r--r-- 1 root root 3552 Jan 8 15:20 build.txt -rw-r--r-- 1 root root 2057 Jan 8 15:20 config.js drwxr-xr-x 2 root root 4096 Jan 9 19:22 css drwxr-xr-x 2 root root 4096 Jan 9 19:22 font drwxr-xr-x 2 root root 4096 Jan 9 19:22 img -rw-r--r-- 1 root root 1734 Jan 8 15:20 index.html -rw-r--r-- 1 root root 562 Jan 8 15:20 LICENSE.md -rw-r--r-- 1 root root 2806 Jan 8 15:20 README.md drwxr-xr-x 4 root root 4096 Jan 9 19:22 vendor |
3.config.jsの設定
ElasticSearch や Port 等をconfig.jsで設定する必要があります。
今回は変更が必要ないため、初期のままにします。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# cat kibana-latest/config.js /** @scratch /configuration/config.js/1 * == Configuration * config.js is where you will find the core Kibana configuration. This file contains parameter that * must be set before kibana is run for the first time. */ define(['settings'], function (Settings) { /** @scratch /configuration/config.js/2 * === Parameters */ return new Settings({ /** @scratch /configuration/config.js/5 * ==== elasticsearch * * The URL to your elasticsearch server. You almost certainly don't * want +http://localhost:9200+ here. Even if Kibana and Elasticsearch are on * the same host. By default this will attempt to reach ES at the same host you have * kibana installed on. You probably want to set it to the FQDN of your * elasticsearch host */ elasticsearch: "http://"+window.location.hostname+":9200", /** @scratch /configuration/config.js/5 * ==== default_route * * This is the default landing page when you don't specify a dashboard to load. You can specify * files, scripts or saved dashboards here. For example, if you had saved a dashboard called * `WebLogs' to elasticsearch you might use: * * +default_route: '/dashboard/elasticsearch/WebLogs',+ */ default_route : '/dashboard/file/default.json', /** @scratch /configuration/config.js/5 * ==== kibana-int * * The default ES index to use for storing Kibana specific object * such as stored dashboards */ kibana_index: "kibana-int", /** @scratch /configuration/config.js/5 * ==== panel_name * * An array of panel modules available. Panels will only be loaded when they are defined in the * dashboard, but this list is used in the "add panel" interface. */ panel_names: [ 'histogram', 'map', 'pie', 'table', 'filtering', 'timepicker', 'text', 'hits', 'column', 'trends', 'bettermap', 'query', 'terms', 'stats', 'sparklines' ] }); }); |
4.アクセス
それではアクセスしてみます。
これで準備は完了です!
いかがでしたでしょうか?
次回は『OSS編~Fluented & Elasticseach & Kibana パート④~』と題して、実際に触ってみます。
お楽しみに!