If you need to change the IP of your OSSEC HUB, you will need to update that IP in each of the agents so they are communicating with the correct IP.
Edit the config file and set <server-ip></server-ip> to that of the new server and restart the agent
- Linux agents it's /var/ossec/etc/ossec.conf
- windows C:\Program Files (x86)\ossec-agent\ossec.conf
- Osx: /var/ossec/etc/ossec.conf
Then restart the agent in linux and osx with
/var/ossec/bin/ossec-control restart
In windows you have to use the task manager and restart the service