Hi Nacho, apologies for the late response.
This means you reached the shards limit count (
1000 by default in the indexer node). To fix this issue, there are multiple options:
-
Delete indices.
This frees shards. You could do it with old indices you don't
want/need using the Indexer's dev tools. You can run commands like
DELETE wazuh-alerts-4.x-2023.*, that will delete all the alerts indices from 2023. You can also specify a specific index to be removed. This process can also be automated with ILM/ISM policies to
delete old indices after a period of time as explained in
this documentation.
-
Add more nodes to your Elasticsearch/Wazuh indexer cluster.
-
Increment the max shards per node
(not recommended). But if you do this option, make sure you do not
increase it too much, as it could provoke inoperability and performance
issues in your Wazuh indexer cluster. To do this:
curl -k -u USERNAME:PASSWORD -XPUT INDEXER_HOST_ADDRESS/_cluster/settings -H "Content-Type: application/json" \
-d '{ "persistent": { "cluster.max_shards_per_node": "MAX_SHARDS_PER_NODE" } }' replace the placeholders, where:
-
USERNAME : username to do the request
-
PASSWORD : password for the user
-
INDEXER_HOST_ADDRESS: Wazuh indexer host address. Include the protocol https if needed.
-
MAX_SHARDS_PER_NODE: Maximum shards by node. Maybe you could try with 1200 o something like that, depending of your case
I hope you find this information helpful.
Regards,