filebeat的安装运行

1、下载

wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-5.4.1-linux-x86_64.tar.gz

2、解压复制

tar -xvf filebeat-5.4.1-linux-x86_64.tar.gz

3、配置

打开配置文件:

cd /u01/secure/filebeat
vim ./filebeat.yml

编辑配置文件:

#=========================== Filebeat  prospectors =============================

filebeat.prospectors:

- input_type: log

  paths:
    - /var/log/*.log
    - /var/log/lynis-report.dat



#=================================File output==================================
##
output.file:
  path: "/tmp/filebeat"
  filename: filebeat



#=================================redis output==================================
#
output.redis:
  hosts: ["10.130.203.166"]
  key: "filebeat"
~

4、运行

手动运行

./filebeat -c filebeat.yml

后台运行:

nohup /u01/secure/filebeat/filebeat -c filebeat.yml >/dev/null 2>&1 &

results matching ""

    No results matching ""