AgentStatusesCollection from CurrentGroupState

Hi,
Am connecting stat server and trying to get AgentStatusesCollection.

             RequestGetStatistic req = RequestGetStatistic.create();
	 StatisticObject object = StatisticObject.create();
	 object.setObjectId(agentgroup);
	 object.setObjectType(StatisticObjectType.GroupAgents);
	 object.setTenantName("Resources");
	 object.setTenantPassword("");
	 req.setStatisticObject(object);
	 
	 StatisticMetric statisticMetric = StatisticMetric.create("CurrentGroupState");
	 req.setStatisticMetric(statisticMetric);		 
	 Message response1 = statServerProtocol.request(req);

Response:
In response, am getting AgentStatusesCollection as size of 0.

‘EventInfo’ (2) attributes:
TM_LENGTH [int] = 0
REQ_ID [int] = 1
VOID_VALUE [object] = ObjectValue: AgentGroup {
GroupId = Test
Status = 23
Time = 1523256757
Agents = AgentStatusesCollection (size=0) [
]
}

USER_REQ_ID [int] = -1
TM_SERVER [int] = 1523260413
LONG_VALUE [int] = 2

Can any one help. Thanks in advance.
Am not using onMessage handler to get the response.
I need this for JAVA API. So, I need this info from doGet Servlet method itself.

Status for an Agent Group?
That won’t work, you should apply it to each agent

Enviado de meu E6633 usando Tapatalk

1 Like

Hi,

Thanks for your response.

I tried as you said. It’s worked.