Hi, thank you for using Wazuh!
Elasticsearch has a limit of 1000 shards per node to avoid performance issues in the environment. You can either reduce the number of shards or increase the limit to solve the situation right now. I'd recommend the first approach, as the second one will need more resources and can lead to performance issues.
To reduce the number of shares you need to delete old indices, you can do it from your web interface opening the side bar, going to dev tools, and writing this
query. For example, this will delete all alerts indices from january:
DELETE wazuh-alerts-4.x-2022.01*
You can run
GET _cat/indices to list all your indices to better analyze which of them do you want to delete. There are also
wazuh monitoring and
wazuh statistics indices. Those indices contains internal information from Wazuh (and not alerts from the agents or manager), and are safe to delete unless you need them.
If you want to go with the second option and increase the limit of shards (not recommended), you can do it by running this command on the Dev Tools:
PUT /_cluster/settings
{ "persistent" : {
"cluster.max_shards_per_node": "2000"
}
}In that example, you will set the maximum limit to 2000.
I will also recommend to implement a lifecycle policy to automatically delete the indices after a specified time, and thus avoiding this issue from happening again. You can read more information about that
on this link.
I hope you find this information helpful. Let me know if you have any questions or doubts!
Regards,