本文共 642 字,大约阅读时间需要 2 分钟。
设置hosts:
在日志客户端机器上面,添加ELK服务器端的IP主机名映射
安装:
[root@hhh opt]# tar-zxvf filebeat-5.4.1-linux-x86_64.tar.gz
配置:
指定输出日志的路径,标签与时间格式
- input_type: log
# Paths that should be crawled and fetched.Glob based paths.
paths:
-/home/admin/output/qumaiyao-web-prepare/logs/jetty_stdout.log
fields:
input_type: log
tag: qumaiyao-web-prepare
multiline:
# pattern: '^[[:space:]]'
# negate: false
pattern: '^[0-9]{4}-[0-9]{2}.*'
negate: true
match: after
配置连接kafka
output.kafka:
enabled: true
hosts: ["10.2.152.202:9092"]
topic: 'qumaiyao-web-prepare'
compression: gzip
max_message_bytes: 1000000
启动:
[root@hhhfilebeat-5.4.1-linux-x86_64]# ./filebeat filebeat.yml
转载地址:http://mmpub.baihongyu.com/