使用filebeat 收取多个日志时 发现只能收取一份日志,再多就不行了
配置如下
filebeat:
prospectors:
- input_type: log
tail_files: true
backoff: "1s"
paths:
- /opt/log/storeinfo.daemon/storeinfo.daemon_debug.log
multiline:
pattern: '^[[]'
negate: true
match: after
fields:
log_topic: "67_39_store_daemon_debug"
paths:
- /opt/log/storeinfo.daemon/storeinfo.daemon_error.log
multiline:
pattern: '^[[]'
negate: true
match: after
fields:
log_topic: "67_39_store_daemon_error"
paths:
- /opt/log/storeinfo.daemon/storeinfo.daemon_info.log
multiline:
pattern: '^[[]'
negate: true
match: after
fields:
log_topic: "67_39_store_daemon_info"
filebeat.config.modules:
reload.enabled: true
output:
kafka:
hosts: ["172.25.134.19:9092"]
topic: '%{[fields.log_topic]}'
partition.round_robin:
reachable_only: false
required_acks: 1
compression: gzip
配置如下
filebeat:
prospectors:
- input_type: log
tail_files: true
backoff: "1s"
paths:
- /opt/log/storeinfo.daemon/storeinfo.daemon_debug.log
multiline:
pattern: '^[[]'
negate: true
match: after
fields:
log_topic: "67_39_store_daemon_debug"
paths:
- /opt/log/storeinfo.daemon/storeinfo.daemon_error.log
multiline:
pattern: '^[[]'
negate: true
match: after
fields:
log_topic: "67_39_store_daemon_error"
paths:
- /opt/log/storeinfo.daemon/storeinfo.daemon_info.log
multiline:
pattern: '^[[]'
negate: true
match: after
fields:
log_topic: "67_39_store_daemon_info"
filebeat.config.modules:
reload.enabled: true
output:
kafka:
hosts: ["172.25.134.19:9092"]
topic: '%{[fields.log_topic]}'
partition.round_robin:
reachable_only: false
required_acks: 1
compression: gzip
4 个回复
luohuanfeng
赞同来自: chachabusi
beyondzhang
赞同来自:
beyondzhang
赞同来自:
谭雁宏
赞同来自: