Create custom index while sending logs from filebeat to elasticsearch

Hi i've setup filebeat(7.17.7) to send logs to elasticsearch(8.5.1)
The logs are getting shipped but to the default index that is filebeat 7.17
Here is my filebeat.yml

  # Array of hosts to connect to.
  hosts: [""]

  output.elasticsearch.index: "nexus-%{[agent.version]}-%{+yyyy.MM.dd}"
     name: 'nexus-%{[agent.version]}-%{+yyyy.MM.dd}'
     pattern: 'nexus-%{[agent.version]}-%{+yyyy.MM.dd}'
     enabled: false
  username: "elastic"
  password: "minutus"
  setup.ilm.enabled: false
  setup.template.overwrite: true

If i add
#index: "nexus-%{[agent.version]}-%{+yyyy.MM.dd}"
filebeat service fails instead of above config giving error attempted to start quickly.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.