Q:非洲食人族的酋长吃什么?

filebeat 只能收取一个日志(解决了)

Beats | 作者 chachabusi | 发布于2018年09月12日 | 阅读数:3526

使用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
 
 
 
 
已邀请:

luohuanfeng

赞同来自: chachabusi

写多个- input_type: log段

beyondzhang

赞同来自:

咨询一直困扰的问题,就是filebeat采集nginx日志的时候,因为日志文件多,为什么有的日志文件的读取速度差几个小时。

beyondzhang

赞同来自:

我没有使用logstash,我是直接从filebeat读取nginx日志到elasticsearch的,filebeat和es都没有报错,就是几个日志的延时非常大,差几个小时,日志的特点就是产生的速度特别快。

谭雁宏

赞同来自:

Good!

要回复问题请先登录注册