ELK之filebeat-redis-logstash-es构架模式

  下载filebeat的rpm包安装filebeat

wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-6.3.0-x86_64.rpm

  安装

filebeat-6.3.0-x86_64.rpm

  配置文件/etc/filebeat/filebeat.yml 

  写一个配置文件

filebeat.inputs:
- type: log
  enabled: true
  paths:
    - /var/log/*.log
    - /var/log/messages
  
  exclude_lines: ['^DBG','^$']
  document_type: system-log-5611
filebeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false
setup.template.settings:
  index.number_of_shards: 3
setup.kibana:
output.file:
  path: "/tmp"
  name: "filebeat.txt"

  默认不带type这里自定义type为document_type: system-log-5611

  排除空行exclude_lines: ['^DBG','^$']

  这里不写入到elasticsearch而是先写入到一个文件

  启动

systemctl start filebeat

  PS:在/tmp下面生成了文件filebeat但是没有txt(原因未知)

  未完待续。。。20

猜你喜欢

转载自www.cnblogs.com/minseo/p/9185423.html