abc@elk:~$ sudo tar -zxvf jdk-11.0.18_linux-x64_bin.tar.gz -c jdk11
abc@elk:~$ vim ~/.bashrc
export JAVA_HOME=/home/abc/jdk11
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
abc@abc:~$ sudo dpkg -i filebeat-8.5.1-amd64.deb
root@abc:/home/abc# vim /etc/filebeat/filebeat.yml
filebeat.inputs:
- type: log
id: my-filestream-id
enabled: true
paths:
- /var/log/auth.log
output.elasticsearch:
hosts: ["172.16.1.107:9200"]
output.elasticsearch.index: "108-authlog" ##修改ES索引名称
setup.template.name: "108-authlog"
setup.template.pattern: "108-authlog-*"
setup.ilm.enabled: false
注:从7.0版本开始,索引生命周期管理(ILM)默认是开启状态,当开启状态时候,setup.template.name和
setup.template.pattern两个参数不生效,所以还需要配置关闭ILM,即setup.ilm.enabled: false
abc@abc:~$ sudo systemctl enable filebeat.service
abc@abc:~$ sudo systemctl start filebeat.service
手机扫一扫
移动阅读更方便
你可能感兴趣的文章