Author Topic: AgentStatusesCollection from CurrentGroupState  (Read 2205 times)

Offline bharath

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
AgentStatusesCollection from CurrentGroupState
« on: April 09, 2018, 11:20:03 AM »
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.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: AgentStatusesCollection from CurrentGroupState
« Reply #1 on: April 09, 2018, 11:23:33 AM »
Status for an Agent Group?
That won't work, you should apply it to each agent

Enviado de meu E6633 usando Tapatalk


Offline bharath

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
Re: AgentStatusesCollection from CurrentGroupState
« Reply #2 on: April 10, 2018, 01:31:43 PM »
Hi,

Thanks for your response.

I tried as you said. It's worked.