The path
/var/lib/wazuh-indexer contains the indexes with the information of the alerts (
wazuh-alerts-4.x-YYYY.MM.DD ) and other internal information like statistics and monitoring of process etc.
You can define a period of retention of these indexes to manage the disk space, on the following blog you have a complete explanation of this index management.
https://wazuh.com/blog/wazuh-index-management/One important thing to mention is that you always need to manage the indexes through the API management or Wazuh-indexer, never should be deleted or modified from the CLI console of the server, due to could generate some inconsistencies.
If you need to list the indexes and check the size you can execute the following from
Menu --> Management --> Dev ToolTo list all indeces
GET /_cat/indices?v=true&s=index
Or if you need only the wazuh-alerts
GET /_cat/indices/wazuh-alerts-*?v=true&s=index
To delete one execute the following
DELETE wazuh-alerts-4.x-2023.02.06
But I recommend you define policies to delete according to a period of retention.