filebeat- 配置

wget https://mirrors.huaweicloud.com/filebeat/7.9.1/filebeat-7.9.1-linux-x86_64.tar.gz

tar -zxvf filebeat-7.9.1-linux-x86_64.tar.gz

mv filebeat-7.9.1-linux-x86_64 /usr/local/filebeat

cd /usr/local/filebeat/

vim test.yml

./filebeat -e -c test.yml
filebeat.inputs:
- type: log
  enable: true
  fields:
    service: directory-service
  paths:
    - /phpwww/directory-service/runtime/logs/*.log
 
 
- type: log
  enable: true
  fields:
    service: app-api
  paths:
    - /phpwww/app-api/runtime/logs/*.log
 
 
 
 
 
 
filebeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false
 
 
setup.template.settings:
  index.number_of_shards: 1
 
 
output.logstash:
  hosts: ["10.10.10.33:5044"]
 
 
processors:
  - add_host_metadata:
      when.not.contains.tags: forwarded
  - add_cloud_metadata: ~
  - add_docker_metadata: ~
  - add_kubernetes_metadata: ~
 
 
 
 
 
原文地址:https://www.cnblogs.com/brady-wang/p/13741931.html