My apologies Tariq, the alerts path was '/var/ossec/logs/alerts/alerts.json'
not /var/ossec/logs/alerts.json
Considering that the log is coming from /usr/share/wazuh-dashboard/data/wazuh/logs/wazuhapp.log
I would suggest for you to try the following:
Stop Wazuh dashboard service: systemctl stop wazuh-dashboard.
Delete the file: rm /usr/share/wazuh-dashboard/data/wazuh/config/wazuh-registry.json
Start Wazuh dashboard service: systemctl start wazuh-dashboard
Delete Browser's cache, local storage, etc
Try to access the Wazuh Dashboard again
In case that the previous steps did not work, let's follow doing some troubleshooting.
1. Let's see if the alerts are being generated and the problem is that they are not impacting the Dashboard. To do this you should check:
/var/ossec/logs/alerts/alerts.json
and
/var/ossec/logs/alerts/alerts.log
If there is updated alert information it means that there is a problem with the connection to the dashboard
2. Let's see
cat /var/log/filebeat/filebeat | grep -i -E "error|warn"
cat /var/ossec/logs/ossec.log | grep -i -E "error|warn"
Let's check the manager and filebeat logs for errors to see if there is a problem with index management
3. Let's check the indexer:
cat /var/log/wazuh-indexer/wazuh-cluster.log | grep -i -E "error|warn"
Are there any additional error messages?
4. You have informed me on the dashboard
cat /usr/share/wazuh-dashboard/data/wazuh/logs/wazuhapp.log
Let's see if there is more information about the error here
journalctl -u wazuh-dashboard
Please
let me know if it worked for you and if not, I would appreciate if you
could share information about the errors or warnings you encountered
with the troubleshooting steps.