You've cross-posted here which you don't need to do. The vRLI agent shouldn't be installed in a template because of the unique ID it generates. You'll need to install the agent fresh upon a new VM deployment from a template. Since the agent is stored on the appliance, you can easily download this from that appliance and install it locally. If you want to see a sample script, you can check out the vRA blueprints I built to do this.
As far as why the status shows "disconnected" intermittently, that's something that would have to be troubleshot. I've never seen that in hundreds of agents. It might also require you to open an SR if you haven't already.