博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

filebeat 配置文件参考

Posted on 2019-07-18 16:06  善恶美丑  阅读(181)  评论(0)    收藏  举报
filebeat.prospectors:

- input_type: log
  paths:
    - /opt/hb_product/sit/log/product.log
  close_older: 1h
  tail_files: true
  exclude_lines: ["DEBUG"]
  multiline.pattern: '\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3}'
  multiline.match: after
  multiline.negate: true
  fields:
    app_name: product_mit
  fields_under_root: true

- input_type: log
  paths:
    - /opt/hb_product/mit/log/product.log
  close_older: 1h
  tail_files: true
  exclude_lines: ["DEBUG"]
  multiline.pattern: '\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3}'
  multiline.match: after
  multiline.negate: true
  fields:
    app_name: product_sit
  fields_under_root: true

#output.elasticsearch:
##  hosts: ["192.168.98.248:9200","192.168.98.249:9200","192.168.98.237:9200"]
##  index: '${ENV}-%{+yyyy.MM.dd}'
##  username: "elastic"
##  password: "changeme"
#
#
output.kafka:
  hosts: ["192.168.13.139:9092"]
  topic: hbtest
  partition.round_robin:
    reachable_only: false
  required_acks: 0
  compression: gzip
  max_message_bytes: 1000000