I have reviewed the information that you have sent me privately.
The "wazuh-remoted" daemon connects to the agents at regular intervals. This is the documentation with all the available configuration options
RemotedYou can run "wazuh-remoted" using the following options
wazuh-remotedWhen "wazuh-remoted" connects to the agent, it updates the information it has about it (if anything has changed). If the Agent's IP changes (the one recognized by the Manager), the Agent will connect to the Manager, since the Manager's IP has not changed but the manager will not recognize the agent. That is, it will recognize the Agent as new since it registers its IP the first time it connects to the Manager.
These cases can be handled with
client-keys and restarting the Manager. In this way we can update the Agent's IP manually but it would have to be done whenever said IP changes.
Another option is to use
agent-auth with the "-I any" option. It's important to include the 'any' keyword since it allows the agent to change its IP. In this case, the new IP would be reflected in the Manager on each new connection.
If the IP that you have been able to see in the logs (with active debug) is not the IP of the Agent that appears in the Manager, it could be part of the data that it receives from the Agent when connecting. I would need to see the logs to be able to say specifically what the situation is.
Hope it helps. Regards.