Hello,
Let me try to help you with this issue, as that's not the expected behavior for an agent's group. Membership is not reset by any scheduled condition by default.
A possible explanation for this could be that your agents are getting disconnected and once they reconnect they trigger the auto-enrollment process again resulting in a new registration with both new client.key value and groups assigned. Please, check if you are having any connectivity issues.
Additionally, try to specify the group within the
ossec.conf for these agents using the
groups tag in
clients >
enrollment. This should avoid losing the group even when re-registering the agent again. You can find more information about the group parameter
here. . Finally, an example configuration using this parameter can be found
here.
Let me know if you have any questions regarding this.