ELK套件之 X-pack 工具的安裝

服務器信息:

    CentOS6.7 x86_64  IP地址: 10.0.20.25

 

ELK版本:

    elasticsearch-5.6.0.rpm

    kibana-5.6.0-x86_64.rpm

    logstash-5.6.0.rpm

 

 

x-pack版本:

    x-pack-5.6.0.zip     先提前下載好zip安裝包丟到/root目錄下,這樣離線安裝起來比較快。

 

ELK單節點的搭建步驟省略,可以參考http://lee90.blog.51cto.com/10414478/1968035。下面直接開始x-pack的安裝。


 

elasticsearch安裝x-pack

cd /usr/share/elasticsearch/

bin/elasticsearch-plugin install file:///root/x-pack-5.6.0.zip

wKioL1nGfMejIpIpAACpqNM4Goo784.png


/etc/init.d/elasticsearch restart


kibana安裝x-pack

cd /usr/share/kibana/

bin/kibana-plugin install file:///root/x-pack-5.6.1.zip

/etc/init.d/kibana restart

 

 

logstash安裝x-pack

cd /usr/share/logstash/

bin/logstash-plugin install file:///root/x-pack-5.6.1.zip

/etc/init.d/logstas hrestart

 

x-pack的配置

在瀏覽器打開 http://10.0.20.25:5601 自動跳轉到登錄頁面  (用戶名elastic 密碼 changeme


我們開啓了xpack後,默認情況下訪問集羣需要密碼了。

這會導致packetbeat等上送數據失敗,提示401報錯。因此需要配置下。

packetbeat爲例,其他的我暫時用不到沒有去試驗。

 

vim /etc/packetbeat/packetbeat.yml   加上ES的用戶名和密碼

packetbeat.interfaces.device:any

packetbeat.protocols.mysql:

  ports: [3306]

  send_request: true

  transaction_timeout: 30s

 

output.elasticsearch:

  hosts: ["10.0.20.25:9200"]

  username:"elastic"

  password:"changeme"

  work: 1

  bulk_max_size: 50

  timeout: 90

  flush_interval: 1s

  template.enabled: true

  template.name:"packetbeat.template"

  template.overwrite: true

  index: test-mysql-%{+yyyy.MM.dd}

 

然後重啓下packetbeat 即可正常的抓取數據存到ES集羣裏面。

(官網文檔地址:https://www.elastic.co/guide/en/beats/packetbeat/current/elasticsearch-output.html

 



更詳細的用法可以參考文章: http://blog.csdn.net/pistolove/article/details/53838138


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章