Hello,
I am facing an issue where all visualizations in the Wazuh Dashboard fail when using aggregations.
The error shown is:
null_pointer_exception
reducePhase.aggregations is null
The failing request:
POST /internal/search/opensearch → 400 Bad Request
Environment:
Findings:
Could you please advise on the next steps to further troubleshoot this issue?
Please let me know if you need any additional logs or outputs.
Thank you.
Hi,
The issue you are facing might be due to a field mapping conflict. In your older index, certain fields may be mapped as keyword, while in newer indices they might be mapped as text or another data type. This mismatch can lead to issues such as shard failures or problems while creating dashboards.
Have you made any configuration changes before encountering this issue? If so, please let us know.
You can also identify the conflicting fields from the Wazuh dashboard:
Click on each conflicting field and compare the data type between the old and new indices. Based on this, you may need to update the index template to match the correct data type and reindex the affected indices to resolve the issue.
Please share screenshots of the fields showing conflicts.
Additionally, run the following command in Dev Tools to inspect the index mapping:
Replace <date> with:
Share both outputs so we can compare them.
Replace <password> with your Wazuh dashboard admin credentials.
This will help us verify if any custom index templates are causing the conflict.
Hello,
Thank you for your guidance.
Findings:
Critical observation:
There is an inconsistency in the mapping of the same field across indices:
In older indices (e.g. wazuh-alerts-4.x-2025.12.18):
rule.id → keywordIn newer indices (e.g. wazuh-alerts-4.x-2026.03.16):
rule.id → text (with keyword subfield)This mismatch is confirmed via Dev Tools (screenshots attached).
Impact:
and eventually:
reducePhase.aggregations is null null_pointer_exceptionNotes:
I am also attaching the additional requested files:
Please review and advise.
Thank you.
Hi,
From the screenshot you shared, it appears that the issue is related to field data type conflicts. Because of this, the affected fields are causing mapping conflicts. To resolve the issue, we need to correct the field data types and then reindex the newer indices that are showing the conflict.
You can run the following command in the Wazuh dashboard Dev Tools to set the field mappings correctly.
On the Wazuh dashboard, go to: Hamburger menu > Indexer Management > Dev Tools
Then run:
If the command executes successfully, you should see a 200 OK status at the top right.
After that, you need to reindex the newer indices that are showing this issue.
First, identify the affected indices.
To list all indices, run: