filebeat直接给es传输日志,自定义索引名,自定义多个索引文件


官方文档地址:
https://www.elastic.co/guide/en/beats/filebeat/7.3/elasticsearch-output.html
https://www.elastic.co/guide/en/beats/filebeat/7.3/defining-processors.html#condition-contains

filebeat.inputs:
- type: log
  enabled: true
  paths:
    - /opt/kidx/deploy/talk-skills/logs/skills_consumer.log
  fields:
    type: skills_consumer
- type: log
  enabled: true
  paths:
    - /opt/kidx/deploy/talk-skills/logs/skills_storage.log
  fields:
    type: skills_storage

setup.ilm.enabled: false

setup.template.settings:
  index.number_of_shards: 1
  index.number_of_replicas: 0
  index.codec: best_compression 

output.elasticsearch:
  hosts: ["192.168.3.210:9400"]
  indices:
    - index: "skills_consumer_%{+yyyy.MM.dd}"
      when.equals:
        fields.type: "skills_consumer"
    - index: "skills_storage_%{+yyyy.MM.dd}"
      when.equals:
        fields.type: "skills_storage"


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM