If you get an alert saying "agent's event queue is full. Events may be lost," it means the agent's event queue has hit its limit and can't take in any more events. This usually happens when there's a huge spike in events, overwhelming the manager's network.
To fix it, you can increase the queue size in the affected agent’s configuration file. Here's how:
1. Go to the Wazuh configuration directory at `/var/ossec/etc/ossec.conf` and edit the file.
2. Add the new configuration below for a specific group that includes just the affected agents. Then, tweak the values gradually to avoid making the bucket too big.
For more details on how to manage this through centralized config, check
here.
<client_buffer>
<disabled>no</disabled>
<queue_size>50000</queue_size>
<events_per_second>800</events_per_second>
</client_buffer>Save the changes.
Then restart the Wazuh manager for the changes to take effect
systemctl restart wazuh-managerYou should know that It's not a good idea to increase the queue size because it can put more strain on both the agents and the network. Instead, it's better to figure out what's causing the issue by looking into the type of logs the agents are processing, how often they come in, and when the problem started.
Wazuh agents have a buffer system in place to prevent a flood of events from overwhelming the manager's network. You can learn more about how this anti-flooding system works in the Wazuh documentation:
https://documentation.wazuh.com/current/user-manual/agents/antiflooding.html.
The Wazuh manager also sends out alerts about the queue's flow levels, which are categorized into different types. More details can be found here:
https://github.com/wazuh/wazuh/blob/master/ruleset/rules/0016-wazuh_rules.xml#L22.
To avoid the queue filling up again, you might want to filter out unnecessary events and make sure there aren’t any network connectivity problems between the agent and the manager. You can also keep an eye on the "noisiest" events using a different visualization in the Wazuh Dashboard. For more on managing Wazuh centrally, check this link:
https://documentation.wazuh.com/current/user-manual/reference/centralized-configuration.html.
Regard,