class EurekaAgentStatusMonitor implements AgentStatusMonitor, EurekaEventListener {

    @Override
    public AgentStatus getStatus(String agentInstanceId) {
        AgentInstance agentInstance = agentManagementService.getAgentInstance(agentInstanceId);
        Pair<InstanceStatus, AgentStatus> current = statusByInstanceId.get(agentInstance.getId());
        if (current == null) {
            // Not registered with Eureka == unhealthy
            return AgentStatus.unhealthy(SOURCE_ID, agentInstance, "Not registered with Eureka", System.currentTimeMillis());
        }
        return current.getRight();

    }

    @Inject public  EurekaAgentStatusMonitor(EurekaClient eurekaClient, AgentManagementService agentManagementService, Registry registry);

}