hi,
I noticed today that i had no more indexes/shard created .. (no more updates on last 7 days datas)
looking logs and services => /usr/share/wazuh-dashboard/data/wazuh/logs/wazuhapp.log
Jun 9, 2022 @ 15:00:02 ERROR Could not create wazuh-monitoring-2022.23w index on elasticsearch due to validation_exception
Jun 9, 2022 @ 15:00:02 ERROR index_not_found_exception
checking log history =>
{"date":"2022-05-31T09:36:04.256Z","level":"error","location":"wazuh-api:checkStoredAPI","message":"Request failed with status code 500"}
{"date":"2022-06-02T22:00:18.247Z","level":"error","location":"monitoring:fetchAllAgentsFromApiHost","message":"ApiID: default, Error request with offset/limit 0/500: Request failed with status code 500"}
{"date":"2022-06-03T17:45:15.022Z","level":"error","location":"monitoring:getApiInfo","message":"Request failed with status code 500"}
{"date":"2022-06-05T22:00:11.606Z","level":"error","location":"cron-scheduler|SaveDocument","message":"resource_already_exists_exception"}
{"date":"2022-06-05T22:00:11.616Z","level":"error","location":"monitoring:createIndex","message":"Could not create wazuh-monitoring-2022.23w index on elasticsearch due to validation_exception"}
{"date":"2022-06-05T22:00:11.625Z","level":"error","location":"monitoring:insertMonitoringDataElasticsearch","message":"index_not_found_exception"}
After trying to understand where is the problem i saw in the web interface an error on policie index with shard saturation ..
i had a similar saturation previously on the 2.3.x and used the solution as discribe here
https://groups.google.com/g/wazuh/c/YoByxPoKMjY and with the blog post
https://wazuh.com/blog/wazuh-index-management/But after migration, wazuh-indexer included, the index policy in place didnt work anymore, i had to clean the policy and remove from "index management/managed indices" all entries, they were stuck for each index.
After that i remove manually from dev tool some wazuh-alerts,wazuh-monitoring and wazuh-statistics.
Index now wazuh-monitoring-2022.23w created (without restart or so) and i have no more alerts in the log, data and graphs populating again.
Now i would like to create a new policy (or several) and would like a clean updated example (or documentation) for wazuh-indexer (the old one seams deprecated), could you help me with this ?
I think this part is really complex and should be automatically configured depending of available resources (ram/cpu) or at least some policies documented for general cases, for mine it's 8GB ram 8 thread/cpu(2.13GHz) all in one debian11 VM for 50/60 agents.
Bonus : if you have a web (or simple) integrated/method to be alert by mail when shard saturation occurred it would be nice ;)
Thanks for the help.
Regards