Collect statistic data from Genesys Stat server

My requirement is get the all the queue details and from each queue need to find the number of active calls,number of calls in transist,number of calls in VHT etc from genesys Stat server. I am using Platform SDK APIs.

Followed the below steps

  1. Get the list of queues(virtual) from Config server.
    • Able to get using CFGDNQuery object.
      2.Finding statistic values using dynamic statistics
    • Iterating the list of queue and trying to find the total number of active calls (callsInBound) for each queue but not getting the total count values. . Below values setting in the request
      StatisticObject type - queue
      object category - totalnumber
      subject - DNAction
      time profile - default
      interval type - growingwindow.

Its working fine for object category as currentstate but not working for totalnumber/currentnumber.I feel something missing to set in statistic metric object.

Could you help on this with providing sample code or enough information need to set for the Statistic metric object.

Thanks in advance

Check your StatServer logs. Also search the forum. This has been discussed already

Enviado de meu C6602 usando Tapatalk

Thanks for the response. Already checked but all are for statistic-category=currentstate but its failing for statistic-category=totalnumber/currentnumber.May be missing some entry like timeprofile,interval etc.. in the statisticobject.

I could not check the log file due to access permission.

Put your code. You will need access to logs. Ask for them or a test StatServer

Enviado de meu C6602 usando Tapatalk

Also, you can do the test via CCpulse, do the statistic in there and see which parameters are used

Enviado de meu C6602 usando Tapatalk

You will need to specify proper masks when you define statistic.
And you really will need to have access to logs.

My Code will be similar like below.. Using Platform SDK version 8.1.

    StatisticObject object = StatisticObject.create();
    object.setObjectId("name_of_virtual_queue@switch_name");
    object.setObjectType(StatisticObjectType.Queue);
    object.setTenantName("Resources");

    DnActionsMask mainMask = new DnActionsMask();
    mainMask.setBit(DnActions.CallEntered);

    DnActionsMask relMask = new DnActionsMask();

    StatisticMetricEx metric = StatisticMetricEx.create();
    metric.setCategory(StatisticCategory.TotalNumber);
    metric.setMainMask(mainMask);
    metric.setRelativeMask(relMask);
    metric.setSubject(StatisticSubject.DNAction);
    metric.setTimeProfile("Default");
    metric.setIntervalType(StatisticInterval.GrowingWindow);

    Notification notification = Notification.create();
    notification.setMode(NotificationMode.Periodical);
    notification.setFrequency(5);

    I am not getting any response from the api.. Tried different StatisticCategory values also.

Please someone help if i am missing anything in the StatisticMetricEx object like timeprofile/time range etc..

I do not see any fragment of code where you connect to the StatServer, send the request and consume the response.

I think one issue is that you are using a DnActions.CallEntered mask for stats from a Queue

mainMask.setBit(DnActions.CallEntered);

If you look at a successful OpenStat request for Total Entered for a Queue the MainMask is 10 (CallEntered)

2015-07-27 11:55:45.328> Client: Message ‘OpenStat’
‘CREATE_SUSPENDED’ ‘no’
‘FILTER’ ‘VoiceCall’
‘DistByConnID’ 0
‘TM_NOTIFICATION_FREQ’ 10
‘NOTIFICATION_MODE’ ‘TimeBasedNotification’ (1)
‘INSENS_PERCENTAGE’ 1
‘INTERVAL’ ‘Growing’ (0)
‘TIME_PROFILE’ ‘Default’
‘STAT_TYPE’ ‘Total_Entered’
‘USER_REQ_ID’ 47
‘REQ_ID’ 61
‘SUBJECT’ ‘DNAction’ (0)
‘CATEGORY’ ‘TotalNumber’ (1)
‘TENANT_ID’ ‘Environment’
‘OBJECT_ID’ ‘Gold@SIP_Switch’
‘OBJECT’ ‘Queue’ (5)
‘VOID_VALUE’ TKVList Length 60
‘Insens’ 1
‘Filter’ ‘VoiceCall’
‘TimeProfile’ ‘Default’
‘MainMask’ all actions clear except for
‘CallEntered’ (10)
‘RelMask’ all actions clear

But if you look at the definition for DnActions.CallEntered, this is equal to 80.

Try using the following code that uses the RoutePointActionsMask and RoutePointActions.CallEntered as below:

            
            RequestOpenStatisticEx req = RequestOpenStatisticEx.Create();
            StatisticObject obj = StatisticObject.Create();
            obj.ObjectId = "Gold@SIP_Switch";
            obj.TenantName = "Environment";
            obj.ObjectType = StatisticObjectType.Queue;
            StatisticMetricEx metric = StatisticMetricEx.Create();
            RoutePointActionsMask mainMask = new RoutePointActionsMask();
            mainMask.SetBit(RoutePointActions.CallEntered);
            RoutePointActionsMask relMask = new RoutePointActionsMask();
            metric.MainMask = mainMask;
            metric.RelativeMask = relMask;
            metric.Subject = StatisticSubject.DNAction;

            metric.Category = StatisticCategory.TotalNumber;
            metric.TimeProfile = "Default";
            metric.IntervalType = StatisticInterval.GrowingWindow;


            Notification notification = Notification.Create();
            notification.Mode = NotificationMode.Periodical;
            notification.Frequency = 30;
            

            req.StatisticObject = obj;
            req.StatisticMetricEx = metric;
            req.ReferenceId = 1;
            req.Notification = notification;

            var response = protocolManagementService["Stat_Server_App"].Request(req);