filebeat elasticsearch index 多个索引

秒速五厘米 2022-01-15 23:57 441阅读 0赞

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

filebeat 小巧好用

  1. filebeat.prospectors:
  2. - input_type: log
  3. paths:
  4. - /var/log/nginx/access.log
  5. fields:
  6. type: "nginx"
  7. - input_type: log
  8. paths:
  9. - /mnt/www/bi.xxxxx.com/app/runtime/tasklog/task_*.log
  10. fields:
  11. type: "task"
  12. json.message_key: log
  13. json.keys_under_root: true
  14. output.elasticsearch:
  15. hosts: ["127.0.0.1:9200"]
  16. #index: "logs-%{[beat.version]}-%{+yyyy.MM.dd}"
  17. indices:
  18. - index: "www-f-nginx-log"
  19. when.equals:
  20. fields.type: "nginx"
  21. - index: "www-f-task-log"
  22. when.equals:
  23. fields.type: "task"
  24. #./filebeat -e -c filebeat.yml -d "Publish"

转载于:https://my.oschina.net/Alexmyj/blog/3016411

发表评论

表情:
评论列表 (有 0 条评论,441人围观)

还没有评论,来说两句吧...

相关阅读