filebeat elasticsearch index 多个索引
2019独角兽企业重金招聘Python工程师标准>>>
filebeat 小巧好用
filebeat.prospectors:
- input_type: log
paths:
- /var/log/nginx/access.log
fields:
type: "nginx"
- input_type: log
paths:
- /mnt/www/bi.xxxxx.com/app/runtime/tasklog/task_*.log
fields:
type: "task"
json.message_key: log
json.keys_under_root: true
output.elasticsearch:
hosts: ["127.0.0.1:9200"]
#index: "logs-%{[beat.version]}-%{+yyyy.MM.dd}"
indices:
- index: "www-f-nginx-log"
when.equals:
fields.type: "nginx"
- index: "www-f-task-log"
when.equals:
fields.type: "task"
#./filebeat -e -c filebeat.yml -d "Publish"
转载于//my.oschina.net/Alexmyj/blog/3016411
还没有评论,来说两句吧...