Friday, January 2, 2015

Kibana

  1. Introduction
    1. Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for ElasticSearch
    2. Kibana is a snap to setup and start using
    3. Written entirely in HTML and Javascript it requires only a plain webserver
    4. Kibana requires no fancy server side components
    5. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elasticsearch
  2. Installation
    1. http://www.elasticsearch.org/overview/kibana/installation/
    2. CD $ES_HOME/plugin/
    3. wget https://download.elasticsearch.org/kibana/kibana/kibana-3.1.0.zip
    4.  unzip kibana-3.1.0.zip
    5. mkdir kibana
    6. mv kibana-3.1.0/ kibana/_site
    7. cd kibana/_site/
    8. vi config.js
    9. edit 'elasticsearch: "http://"+window.location.hostname+":9200",'
    10. open web browser
    11. enter 'http://es:9200/_plugin/kibana'
  3. Sample
    1. run the command addressed below
      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" }
         }
        }
       }
      }
      ';
    2. wget http://www.elasticsearch.org/guide/en/kibana/current/snippets/shakespeare.json
    3. curl -XPUT localhost:9200/_bulk --data-binary @shakespeare.json
    4. http://es:9200/_plugin/kibana/index.html#/dashboard/file/guided.json
    5. configure dashboard -> index -> default index -> shakespeare -> save
    6. downlad 'http://www.elasticsearch.org/guide/en/kibana/current/snippets/plays.json'
    7. load -> advanced -> select file -> plays.json -> ok

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.