Oneagent goes offline(Unmonitored state) for a longtime

I think the easiest way is to reinstall the agent again on the host with the latest update. or you can open a support ticket to go through the troubleshooting.