How can I change "winlogbeat" name in "template.name"?

Excuse me, I'm confused. I must put output.elasticsearch.index into my "winlogbeat" configuration?

output.elasticsearch:
  hosts: ["http://localhost:9200"]
  index: "logs-%{+yyyy.MM.dd}"

then "template JSON" file and change "winlogbeat-" to "logs-" ?

Thank you.