I use space in ELK to put different indexes in different space:
my indexes are created on a monthly basis, part of my logstash is configured as shown below:
Currently I create indexes manually, is it possible to create indexes automatically for different spaces every month? If so, how should I do it? If not, is there an interface that I can write a script to do so?


Creating a tenant (space) per month is not a best practice but you can follow the below steps if you really want.
You can create a space per month with spaces API call. https://www.elastic.co/guide/en/kibana/current/spaces-api.html
You can manage roles and can add specific index/alias to a space with role management API call. https://www.elastic.co/guide/en/kibana/current/role-management-api.html
Now a new space called
dashboard-2024-03and a new role calledrole-2024-03created. In thedashboard-2024-03dashboard the only visible data is the data inindex-2024-03index.Additional note: To give access only to a specific dashboard you can create a new user and assign only
role-2024-03to that user.