坑坑坑,官网说明很不明显

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对其