I am trying to fetch the Queue statistics from stat server using the Platform SDK StatServerProtocol but i am not getting the Total_Calls_Entered stat from it, below is the code snippet:
confServerProtocol =
new ConfServerProtocol(
new Endpoint("CSProxy","host",port));
confServerProtocol.setUserName("User name");
confServerProtocol.setClientName("Client Name that i enter during GA login");
confServerProtocol.setUserPassword("PWD");
System.out.println("Initializing Config Protocol");
confServerProtocol.setClientApplicationType(CfgAppType.CFGSCE.ordinal());
IConfService confService = ConfServiceFactory.createConfService(confServerProtocol);
confServerProtocol.open();
System.out.println("Config Protocol Opened ");
statProtocol = new StatServerProtocol(
new Endpoint(
"Statserver App Name",
"Host name",
Port));
statProtocol.setClientName("Statserver App Name");
System.out.println("Initializing Protocol");
System.out.println("Stat Protocol Opening ");
statProtocol.open();
System.out.println("Stat Protocol Opened ");
requestOpenStatistic
= RequestOpenStatistic.create();
object = StatisticObject.create();
object.setObjectId(qName);
object.setObjectType(StatisticObjectType.Queue);
object.setTenantName("Resources");
object.setTenantPassword("");
metric = StatisticMetric.create();
metric.setStatisticType("Total_Calls_Entered");
notification = Notification.create();
notification.setMode(NotificationMode.NoNotification);
notification.setFrequency(5);
requestOpenStatistic.setStatisticObject(object);
requestOpenStatistic.setStatisticMetric(metric);
requestOpenStatistic.setNotification(notification);
requestOpenStatistic.setReferenceId(2);
System.out.println("Sending:\n" + requestOpenStatistic);
statProtocol.send(requestOpenStatistic);
//statProtocol.setCopyResponse(true);
response = statProtocol.request(requestOpenStatistic);
//System.out.println("Stat response is"+response.toString());
//System.out.println("Stat Detail is"+statProtocol.receive().toString());
for (int i=0; i < 4; ++i) {
System.out.println("Stat Detail is"+statProtocol.receive(-1));
}
System.out.println(statProtocol.request(RequestCloseStatistic.create(2)));
statProtocol.close();
confServerProtocol.close();
I am getting response as below:
Sending:
'RequestOpenStatistic' (1034) attributes:
StatisticMetric:
STATTYPE [str] = "Total_Calls_Entered"
REQ_ID [int] = 2
StatisticObject:
TENANT_ID [str] = "Resources"
OBJECT [int] = 5 [Queue]
TENANT_PASSWORD [str] = [output suppressed]
OBJECT_ID [str] = "VQ_Name@SIPSwitch"
Notification:
TM_NOTIFICATION_FREQ [int] = 5
NOTIFICATION_MODE [int] = 2 [NoNotification]
INSENS_PERCENTAGE [int] = 0
Stat Detail is'EventServerMode' (23) attributes:
TM_LENGTH [int] = 1462987272
LONG_VALUE [int] = 1
USER_REQ_ID [int] = 0
TM_SERVER [int] = 1462987272
REQ_ID [int] = 0
Please let me know if i am missing anything as i dont get the stats?