Kibana的安裝和配置

一、須要在Linux中安裝ElasticSearch,參考博客:https://www.cnblogs.com/liuyi-clover/p/11330642.htmlhtml

二、解壓已經上傳到elasticsearch目錄中的壓縮包
          cd /usr/local/elasticsearch/
          tar -zxvf kibana-5.6.16-linux-x86_64.tar.gz
          mv kibana-5.6.16-linux-x86_64 kibana-5.6.16linux

三、修改Kinaba配置文件vim

          cd kibana-5.6.16
          vim config/kibana.ymlelasticsearch

#Kibana主機地址
server.port: 5601
#ES主機地址
elasticsearch.url: "http://106.12.140.159:9200"
#ES帳號密碼
elasticsearch.username: "es"
elasticsearch.password: "12345"
#平常用的ping
elasticsearch.pingTimeout: 1500
#讀取es的超時時間
elasticsearch.requestTimeout: 30000
#全部外網IP都可訪問
server.host: "0.0.0.0"

            保存退出!url

三、啓動Kinabaspa

          cd /usr/local/elasticsearch/kibana-5.6.16/bin
          ./kibana3d

四、驗證Kinabacode

          訪問  http://106.12.140.159:5601server

          

          出現上圖表示成功!!!htm

五、備註

訪問http://106.12.140.159:5601
初始化時可在management中輸入*,在DEVTool中操做索引(CRUD)
可在Discover中查看全部索引信息
建立索引:
PUT /students
{
    "settings": {
        "index": {
            "number_of_shards": 3,
            "number_of_replicas": 1
        }
    }
}
刪除索引:
DELETE /students
刪除多個索引
DELETE /index_one,index_two
增長文檔,自定義id
PUT /students/student/1
{
  "name": "葉良辰",
  "age": 25,
  "desc": "葉良辰,本地人,狂妄自大,惹了他,會有一百種方法讓你呆不下去"
}
增長文檔,默認id
POST /students/student
{
  "name": "李四",
  "age": 18,
  "desc": "沉魚落雁,閉月羞花"
}
查看文檔
GET /students/student/1
查看全部文檔
GET /students/_search
根據字段聯合查詢(根據name查詢出name,age)
GET students/student/_search?_source=name,age
{
  "query": {
    "match": {
      "name": "葉良辰"
    }
  }
}
匹配查詢,匹配到單字極客查到
POST /students/_search
{
    "query": {
        "match": {
            "name": "葉良辰"
        }
    },
    "sort": [
        {
            "age": {
                "order": "desc"
            }
        }
    ]
}
相關文章
相關標籤/搜索