1. 下载 & 解压

# 下载
wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.1.1-linux-x86_64.tar.gz
# 解压
tar xvf filebeat-7.1.1-linux-x86_64.tar.gz
# 软链
ln -s filebeat-7.1.1-linux-x86_64 filebeat

2. 配置 filebeat.yml

vim filebeat.yml

# 详情如下:
filebeat.inputs:
- type: log
  enabled: true
  paths:
    - /data/action_log/*.log
  scan_frequency: 10s

# 7.x的版本中需要禁用此索引生命周期,否则在指定es索引名字的时候会有问题
setup.ilm.enabled: false
# 添加模板配置,否则无法指定es的索引名
setup.template.name: "actionlog"
setup.template.pattern: "actionlog-*"

output.elasticsearch:
  #worker: 1
  #bulk_max_size: 1500
  hosts: ["10.240.0.6:9200", "10.240.0.7:9200", "10.240.0.8:9200"]
  index: "actionlog-%{+yyyy.MM.dd}"
  #pipeline: "actionlog"

# Logging
logging.level: warning
logging.to_files: true

3. 启动

./filebeat -e -c filebeat.yml

参考

  1. https://www.cnblogs.com/cjsblog/p/9495024.html

相关文章:

  • 2021-04-18
  • 2021-09-05
  • 2021-12-22
  • 2021-08-15
  • 2021-08-10
  • 2021-09-12
  • 2022-12-23
  • 2021-12-07
猜你喜欢
  • 2022-12-23
  • 2021-11-23
  • 2022-01-07
  • 2022-12-23
  • 2021-06-26
  • 2021-11-08
  • 2022-02-03
相关资源
相似解决方案