Install Filebeat Filebeat is a lightweight software for sending logs is available for Windows, MacOS and Linux.
Install Filebeat from rpm package 1 2 3 4 5 6 7 8 9 10 11 12 Download rpm package (with sha512 checked) $ wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.2.0-x86_64.rpm $ wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.2.0-x86_64.rpm.sha512 Install Filebeat $ rpm -ivh filebeat-7.2.0-x86_64.rpm Check filebeat version (7.2.0) $ filebeat version Move custom.yml(content differ from every project) into filebeat directory. $mv  custom.yml /etc/filebeat/
(Optional) Install Filebeat from binary 1 2 3 4 5 6 7 8 9 10 Download Filebeat 7.2.0 binary (with sha512 checked) $wget  https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.2.0-linux-x86_64.tar.gz$wget  https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.2.0-linux-x86_64.tar.gz.sha512Unzip filebeat package. Check filebeat version (7.2.0) $ ./filebeat version Move custom.yml(content differ from every project) into filebeat directory. 
Modify custom.yml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Modify absolute source  log  path & instance name. Linux version: -------------------------------------------------------- filebeat.inputs: - type : log      paths:    - /usr/local/apache/tomcat/logs/catalina.log     fields:     pipeline_log_id: project     	instance: custom_instance     fields_under_root: true      tail_files: false      scan_frequency: 3s     idle_timeout: 3s output.logstash:     hosts: ["www.elk02.co:5044" ]     worker: 5 -------------------------------------------------------- MS windows version: -------------------------------------------------------- filebeat.inputs: - type : log      paths:    -  'C:\tomcat\logs\catalina.log'      fields:         pipeline_log_id: project     	instance: custom_instance     fields_under_root: true      tail_files: false      scan_frequency: 3s     idle_timeout: 3s output.logstash:     hosts: ["www.elk02.co:5044" ]     worker: 5 
Modify log sending destination. 1 2 3 4 5 6 7 8 9 10 11 12 13 filebeat.inputs: - type : log      paths:    - /usr/local/apache/tomcat/logs/catalina.log     fields:         pipeline_log_id: project     	instance: custom_instance     fields_under_root: true      tail_files: false      scan_frequency: 3s     idle_timeout: 3s output.logstash:     hosts: ["www.elk02.co:5044" ]     worker: 5 
Run filebeat 1 2 3 4 5 Change directory into filebeat folder. Execute filebeat. MS windows version: (Keep the window opened)C:\filebeat> filebeat.exe -c custom.yml Linux windows version:[root@localhost filebeat]$nohup  filebeat -c custom.yml &