xxxmenger 发表于 2019-1-28 09:30:50

ELK套件之 X

  服务器信息:
      CentOS6.7 x86_64IP地址: 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.运维网.com/10414478/1968035。下面直接开始x-pack的安装。
  

  
  
elasticsearch安装x-pack
  cd /usr/share/elasticsearch/
  bin/elasticsearch-plugin install file:///root/x-pack-5.6.0.zip
https://s1.运维网.com/wyfs02/M01/A5/F9/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:
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
  




页: [1]
查看完整版本: ELK套件之 X