List<Long> behindAgents = findAgentsBehindOnPing();
for (Long agentId : behindAgents) {
SearchCriteriaService<HostVO, HostVO> sc = SearchCriteria2.create(HostVO.class);
sc.addAnd(sc.getEntity().getId(), Op.EQ, agentId);
HostVO h = sc.find();
ResourceState resourceState = h.getResourceState();
if (resourceState == ResourceState.Disabled || resourceState == ResourceState.Maintenance || resourceState == ResourceState.ErrorInMaintenance) {
/* Host is in non-operation state, so no investigation and direct put agent to Disconnected */
status_Logger.debug("Ping timeout but host " + agentId + " is in resource state of " + resourceState + ", so no investigation");
_agentMgr.disconnectWithoutInvestigation(agentId, Event.ShutdownRequested);
} else {