Adding host-alive checks for the agent

Change-Id: I8657695ef5c1770adb58c991e5e6de837626c19b