Elasticsearch を利用して情報を可視化する Kibana について簡単にまとめます。Elasticsearch は準備済みであるとします。
参考にしたページ
実行手順
Downloads | Kibana からダウンロードおよび解凍して以下のコマンドを実行してください。
$ bin/kibana
チュートリアル
サンプルデータをダウンロードして解凍
カスタムマッピングを作成 (accounts インデックスは自動生成されるマッピングで対応可能)
curl -XPUT http://localhost:9200/shakespeare -d '
{
  "mappings" : {
    "_default_" : {
      "properties" : {
        "speaker" : {"type": "string", "index" : "not_analyzed" },
        "play_name" : {"type": "string", "index" : "not_analyzed" },
        "line_id" : { "type" : "integer" },
        "speech_number" : { "type" : "integer" }
      }
    }
  }
}'
curl -XPUT http://localhost:9200/logstash-2015.05.18 -d '
{
  "mappings" : {
    "log" : {
      "properties" : {
        "geo" : {
          "properties" : {
            "coordinates" : {
              "type" : "geo_point"
            }
          }
        }
      }
    }
  }
}'
curl -XPUT http://localhost:9200/logstash-2015.05.19 -d '
{
  "mappings" : {
    "log" : {
      "properties" : {
        "geo" : {
          "properties" : {
            "coordinates" : {
              "type" : "geo_point"
            }
          }
        }
      }
    }
  }
}'
curl -XPUT http://localhost:9200/logstash-2015.05.20 -d '
{
  "mappings" : {
    "log" : {
      "properties" : {
        "geo" : {
          "properties" : {
            "coordinates" : {
              "type" : "geo_point"
            }
          }
        }
      }
    }
  }
}'
データを流し込む
curl -XPOST 'localhost:9200/accounts/account/_bulk?pretty' --data-binary @accounts.json
curl -XPOST 'localhost:9200/shakespeare/_bulk?pretty' --data-binary @shakespeare.json
curl -XPOST 'localhost:9200/_bulk?pretty' --data-binary @logs.jsonl
curl 'localhost:9200/_cat/indices?v'
公式ドキュメントの画像説明を見ながら操作 (Elasticsearch の Aggregation が多用されていることが分かります)

0
記事の執筆者にステッカーを贈る
有益な情報に対するお礼として、またはコメント欄における質問への返答に対するお礼として、 記事の読者は、執筆者に有料のステッカーを贈ることができます。
さらに詳しく →Feedbacks
ログインするとコメントを投稿できます。
関連記事
- Elasticsearch 導入のための基礎知識Elasticsearch は Apache Solr と同様に内部的に Apache Lucene を利用した全文検索アプリケーションです。公式ページをもとに導入手順および基本的なコマンド例をまとめます。 参考にしたページ [Elasticsearch 1.7](https://www.elastic.co/guide/en/elastics
 - Elasticsearch 日本語全文検索Elasticsearch で日本語の全文検索を行うための方法の一つは Kuromoji を利用することです。Kuromoji は Java で書かれているオープンソースの日本語形態素解析エンジンです。コマンド例をまとめます。 「[黒文字](https://www.google.co.jp/search?site=imghp&tbm=isch&biw=1312&bih=94...
 


