java-union.yml 774 Bytes
filebeat.prospectors:
- input_type: log
  paths:
     - /Data/logs/union/ACTIVE_DINGDANG.log
  document_type: metrics
  fields:
      source_ip: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
      nginx_type: "union"
  fields_under_root: true
  tail_files: true
- input_type: log
  paths:
     - /Data/logs/nginx/nginx_error.log
  document_type: metrics
  fields:
      source_ip: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
      nginx_type: "union"
  fields_under_root: true
  tail_files: true
  multiline.pattern: '^\d{4}'
  multiline.negate: true
  multiline.match: after
output.kafka:
  enabled: true
  hosts: ["{{ kafka_hosts }}"]
  topic: '%{[type]}'
  compression: gzip
  max_message_bytes: 10000000
  worker: 2