Hi Andrew,
If we talk about wazuh-indexer and the data engine we use (Opensearch/Elasticsearch). By default, it uses time-based indices as you mentioned. Although it is also a possibility to switch to indices created for X period of time defining different conditions.
Within the product, ISM/ILM is offered and allows us to rotate and delete data based on different criteria but it all depends on your requirements, how much data you are indexing per day, how many nodes you have in your cluster, and if HA is a requirement for you. The time you can use for an index will depend on all these criteria.
An important question here is how long you need to keep the data. By far most efficient way to delete data in Wazuh-indexer/Elasticsearch is to delete complete indices, and this is one of the main reasons why time-based indices are used. If you have a single index you need to delete using delete-by-query, which is much less efficient and will cause a lot higher load on your system.
As previously said, based on the size of your indices, this rotation or the index creation configuration must be defined, since under different criteria you could have performance problems in your cluster. This blog explains what makes up an index, what a shard is, and how I should configure it:
https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-clusterI would recommend using time-based indices. You can either use rollover to create new indices based on a combination of size and/or age.
Irrespective of whether you use rollover or time-based indices based on the index name you can use ILM to manage the rollover (if applicable) and retention.
I hope this information helps. Please let me know if you have any other questions.