Requirement to clear the index data and load fresh data

I have a requirement to clear the existing index data and load the data into the same index whenever we run the logstash config.

How can we achieve this through the config file ?

You are better off deleting the index and recreating it. That will need to be done externally.

Otherwise, create a new index and then use an alias to manage where it points to.

Cant we have the " delete index " (https://www.elastic.co/guide/en/elasticsearch/guide/current/_deleting_an_index.html) Api calls in the logstash config files?

No, sorry.

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