Filebat - Create a custom index on elasticsearch

Please someone here understand what is happen with my config, my filebeat doenst create index with my custom name. When i run the command filebeat setup the filebeat communicate with my elastic and create a index default filebeat.

filebeat.inputs:

  • type: log
    enabled: true
    paths:
    • /var/log/*.log

setup.template.enabled: false
setup.template.name: 'srvprod_beat'
setup.template.pattern: 'srvprod_beat-*'

output.elasticsearch:
hosts: ["srvelastic:9200"]
username: "user-elastic"
password: "MyPassWord"
index: 'srvprod_beat-%{[agent.version]}-%{+dd.MM.yyyy}'

My filebeat, elastic-cluster, kibana is 7.3 all Linux.

Even I too face similar issue, is there any better documentation or anyone who can help on setting a custom index name?

I have the same issue. Did you fix it yet? :roll_eyes:

If you don't specify either an index template name nor its pattern name, you'll get an error (see below), but even if you do, the default template filebeat-7.3.1 is still getting loaded, :thinking: why!

Exiting: setup.template.name and setup.template.pattern have to be set if index name is modified

If i mention setup.template.name and setup.template.pattern i dont get any error but still my index name remains filebeat-version-date.

Add the following configuration to filebeat
setup.ilm.enabled: false

1 Like

This line totally did the trick! Thanks!

@Anantha_Padmanabhan It's not that, I had that setup already. It was setup.ilm.enabled: false

@Anantha_Padmanabhan, it's a known issue

Yep I did this but when you disable the ILM your filebeat doesn't auto create Lifecycle policy.

yeah i too fixed it by doing the same temporarily..

It's an open issue since April, 2019.