使用 shuf 来打乱一个文件中的行或是选择文件中一个随机的行。

filebeat : Non-zero metrics in the last 30s

匿名 | 发布于2019年11月04日 | 阅读数:9472

filebeat.inputs:
- type: log
  enabled: true
  paths:
    - /opt/test1.log
  multiline.pattern: '^[0-9]{2}'
  multiline.negate: true
  multiline.match: after
output.kafka:
  hosts: ["10.0.0.50:9092"]
  topic: errors-log
 
2019-11-04T19:44:52.046+0800    INFO    [monitoring]    log/log.go:144    Non-zero metrics in the last 30s    {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":60,"time":{"ms":2}},"total":{"ticks":90,"time":{"ms":3},"value":90},"user":{"ticks":30,"time":{"ms":1}}},"handles":{"limit":{"hard":4096,"soft":1024},"open":9},"info":{"ephemeral_id":"f57255ba-ea42-4a49-81ab-2d9c733403d2","uptime":{"ms":540013}},"memstats":{"gc_next":4194304,"memory_alloc":2149256,"memory_total":14583208}},"filebeat":{"harvester":{"open_files":1,"running":1}},"libbeat":{"config":{"module":{"running":0}},"pipeline":{"clients":1,"events":{"active":0}}},"registrar":{"states":{"current":7}},"system":{"load":{"1":0,"15":0.05,"5":0.01,"norm":{"1":0,"15":0.05,"5":0.01}}}}}}
2019-11-04T19:44:58.606+0800    INFO    beater/filebeat.go:442    Stopping filebeat
2019-11-04T19:44:58.606+0800    INFO    crawler/crawler.go:139    Stopping Crawler
2019-11-04T19:44:58.606+0800    INFO    crawler/crawler.go:149    Stopping 1 inputs
2019-11-04T19:44:58.606+0800    INFO    input/input.go:149    input ticker stopped
2019-11-04T19:44:58.606+0800    INFO    input/input.go:167    Stopping Input: 2786624738721439644
2019-11-04T19:44:58.606+0800    INFO    log/harvester.go:276    Reader was closed: /opt/test1.log. Closing.
2019-11-04T19:44:58.606+0800    INFO    crawler/crawler.go:165    Crawler stopped
2019-11-04T19:44:58.606+0800    INFO    registrar/registrar.go:356    Stopping Registrar
2019-11-04T19:44:58.606+0800    INFO    registrar/registrar.go:282    Ending Registrar
2019-11-04T19:44:58.609+0800    INFO    [monitoring]    log/log.go:152    Total non-zero metrics    {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":60,"time":{"ms":64}},"total":{"ticks":90,"time":{"ms":95},"value":90},"user":{"ticks":30,"time":{"ms":31}}},"handles":{"limit":{"hard":4096,"soft":1024},"open":8},"info":{"ephemeral_id":"f57255ba-ea42-4a49-81ab-2d9c733403d2","uptime":{"ms":546577}},"memstats":{"gc_next":4194304,"memory_alloc":2428136,"memory_total":14862088,"rss":17891328}},"filebeat":{"events":{"added":13,"done":13},"harvester":{"closed":1,"open_files":0,"running":0,"started":1}},"libbeat":{"config":{"module":{"running":0}},"output":{"events":{"acked":11,"batches":4,"total":11},"type":"kafka"},"outputs":{"kafka":{"bytes_read":1763,"bytes_write":2746}},"pipeline":{"clients":0,"events":{"active":0,"filtered":2,"published":11,"retry":1,"total":13},"queue":{"acked":11}}},"registrar":{"states":{"current":7,"update":13},"writes":{"success":7,"total":7}},"system":{"cpu":{"cores":1},"load":{"1":0,"15":0.05,"5":0.01,"norm":{"1":0,"15":0.05,"5":0.01}}}}}}

 
已邀请:
匿名用户

匿名用户

赞同来自:

求大佬帮忙解决

zqc0512 - andy zhou

赞同来自:

下面不是有日志显示取道数了么?

Kuange - 90后IT男

赞同来自:

我也遇到这种情况,我在两台主机上都部署了filebeat,结果每天下午6点左右几乎同时关闭,日志和楼主一样,找不到什么原因
 

要回复问题请先登录注册