I'm not really sure if the problem is that your old agents only connect to Node01 or if the problem is that they are disconnected now.
Assuming that you have set your original manager as the master of the new cluster, and that you have connected new nodes as workers to said cluster, the client.keys (file where the keys of the registered agents are saved) should still contain the keys of your former agents. In this case the agents should still be registered and they should be able to connect to any node in the cluster.
For the agents to be distributed among the different managers, it is recommended to use a load balancer or failover mode, as explained in this section of the documentation: Agents connections
Note that in case of using a load balancer, managers will only see the IP of this load-balancer when agents try to connect. If the use_source_ip
option of the manager wasn't no
when the agents were registered, the managers will not allow them to connect, showing a message like this in the ossec.log
2021/09/27 07:53:03 ossec-remoted: WARNING: (1213): Message from '172.25.0.5' not allowed. Cannot find the ID of the agent. Source agent ID is unknown.
In this case, it would be best to re-register the agents after changing this option in the ossec.conf of the master node so it looks like this: <use_source_ip>no</use_source_ip>.
Let me know what exactly your problem is so I can better help you, in case this doesn't answer your question.