This may happen because of unavailability time of the manager being greater than 1 minute (manager under maintenance or minor network issuefor example), the agents attempt to re-connect for 5 times every 10 seconds and, if failed 5 times in a row, they will attempt to re-register to the manager indefinitely, causing this behavior, they will be seen as disconnected from the manager point of view (if you see the manager's logs on /var/ossec/logs/ossec.log you will notice several "duplicated agent name" failed registration attempts), if the agent is still disconnected (it did not re-register) you can restore the connectivity to the manager by restarting the service (on the agent), this will cause the retries count to reset and the agent to attempt to connect again to the manager.
To restart the agent service:
In order to prevent this issue, of the agents trying re-registering that fast, you can change agent parameters to increase the times the agent retries to connect and the interval between attempts.
These options need to be configured in the client section on the local config of each agent (can’t be distributed through centralized configuration), here are the options.
<max_retries>: The number of connection retries.And this is a sample of how it may be configured:
<client>Here is the documentation reference for the available options:
https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/client.html#max-retries
(please change the version of the documentation on the top right corner to the one matching your environment/agent)
Hope this helps.
Regards.
--
You received this message because you are subscribed to the Google Groups "Wazuh | Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/fa6ef8f3-b96a-414a-961e-fe4dc558e28dn%40googlegroups.com.