1. 程式人生 > >【ELK】3 Kibana安裝

【ELK】3 Kibana安裝

kibana是一個與elasticsearch一起工作的開源的分析和視覺化的平臺。使用kibana可以查詢、檢視並與儲存在elasticsearch索引的資料進行互動操作。使用kibana能執行高階的資料分析,並能以圖表、表格和地圖的形式檢視資料。

kibana使得理解大容量的資料變得非常容易。它非常簡單,基於瀏覽器的介面使我們能夠快速的建立和分享顯示elasticsearch查詢結果實時變化的儀表盤

 

1、Kibana安裝

官網下載 kibana-5.2.2-linux-x86_64.tar.gz

 

無需安裝,解壓即用,步驟如下

 

# cd /usr/local/src/kibana-5.2.2-linux-x86_64.tar.gz

# tar -zxvf kibana-5.2.2-linux-x86_64.tar.gz

# mv kibana-5.2.2-linux-x86_64 /usr/local/kibana

# cd /usr/local/kibana/bin

# ./kibana

2、Kibana安裝x-pack外掛

1)第一種,直接命令安裝x-pack

# cd /usr/local/kibana/bin

# ./kibana-piugin install x-pack (時間略長,耐心等待)

Attempting to transfer from x-pack

Attempting to transfer from https://artifacts.elastic.co/downloads/kibana-plugins/x-pack/x-pack-5.2.2.zip

Transferring 108045644 bytes (換算下大概103M)

 

2)第二種,下載 x-pack-5.2.2.zip 檔案

https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-5.2.2.zip

Elasticsearch,Kibana和Logstash的外掛包含在同一個zip檔案中。如果已下載此檔案以在其中一個產品上安裝X-Pack,則可以重複使用同一檔案

 

# ./kibana-plugin instal /usr/local/src/x-pack-5.2.2.zip

 

3、配置kibana.yml

修改kibana.yml檔案:設定es 地址,設定es登入賬號、密碼

 

# cd /usr/local/kibana/config

# vi kibana.yml

server.host: "xx.xx.xx.xx"

#預設es x-pack賬號、密碼

elasticsearch.username: "elastic"

elasticsearch.password: "changeme"

#配置kibana訪問的es url

elasticsearch.url: "http://47.97.23.184:9200"

#去除啟動日誌中的warn

xpack.reporting.encryptionKey: "a random key"

#去除啟動日誌中的warn,且必須是32位

xpack.security.encryptionKey: "12345678901234567890123456789012"

kibana.index: ".kibana"

 

# ./kibana

4、驗證

訪問 http://ip:5601 ,開啟如下頁面,輸入配置檔案中配置的username\password登入即可。

 

頁面模組資訊如下:

Disvcover [dɪˈskʌvɚ] 發現

Visualize [ˈvɪʒuəˌlaɪz] 視覺化

Dashboard [ˈdæʃbɔ:rd] 儀表盤

Timelion 時間軸

Graph 圖

Dev Tools 研發工具

Monitoring ['mɒnɪtərɪŋ] 監測

Management 管理

 

 

1)頁面異常資訊,Error: Please specify a default index pattern

建立pattern

 

附錄啟動異常,修改配置檔案即可:

1)Status changed from uninitialized to red - Authentication Exception

log [08:39:05.379] [warning][security] Session cookies will be transmitted over insecure connections. This is not recommended.

log [08:39:05.434] [error][status][plugin:[email protected]] Status changed from uninitialized to red - Authentication Exception log [08:39:05.445] [error][status][plugin:[email protected]] Status changed from uninitialized to red - Authentication Exception

 

2)[warning][reporting] Generating a random key for xpack.reporting.encryptionKey. To prevent pending reports from failing on restart, please set xpack.reporting.encryptionKey in kibana.yml

 

3)[warning][security] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in kibana.yml

 

4)[warning][security] Session cookies will be transmitted over insecure connections. This is not recommended.