坑坑坑, 官网说明很不明显
https://www.elastic.co/guide/en/beats/metricbeat/current/configuration-template.html
6.0 以后版本具体设置在 filebeat.yml 如下
- setup.template.name: "myname-01" #顶格, 和 output 对其
- setup.template.pattern: "myname-01-*" #顶格, 和 output 对其
- output.elasticsearch:
- hosts: ["192.168.10.63:9200"]
- index: "myname-01-%{ yyyy.MM.dd}" #和 hosts 对其
来源: http://www.bubuko.com/infodetail-2518771.html