Hello Atul,
Thank you for sharing your query with us.
Wazuh stores all the events received from the agents in the
/var/ossec/logs/archives/archives.(json|log). The events that are important or of security relevance are considered as alerts and these alerts are stored at
/var/ossec/logs/alerts/alerts.(json|log).
However, for both alerts and archives, logs are rotated automatically and an individual directory is created for each month and year. When you consider troubleshooting any previous logs, it is always better to store your logs day-wise than store them all together.
As you are concerned about the space consumption, you can only receive the alert logs and skip logging the archives by setting the
logall and
logall_json configuration at ossec.conf as:
<ossec_config>
<global>
<jsonout_output>yes</jsonout_output>
<alerts_log>yes</alerts_log>
<logall>no</logall>
<logall_json>no</logall_json>
</global>
</ossec_config>