Author Topic: Collect statistic data from Genesys Stat server  (Read 9006 times)

Offline callmevijayc

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Collect statistic data from Genesys Stat server
« on: July 15, 2015, 03:39:00 PM »
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 [b]but not getting the total count values.[/b]    . 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
               
         

« Last Edit: July 15, 2015, 03:55:24 PM by callmevijayc »

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Collect statistic data from Genesys Stat server
« Reply #1 on: July 15, 2015, 05:32:11 PM »
Check your StatServer logs. Also search the forum. This has been discussed already

Enviado de meu C6602 usando Tapatalk


Offline callmevijayc

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: Collect statistic data from Genesys Stat server
« Reply #2 on: July 15, 2015, 05:56:13 PM »
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.



Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Collect statistic data from Genesys Stat server
« Reply #3 on: July 15, 2015, 06:36:34 PM »
Put your code. You will need access to logs. Ask for them or a test StatServer

Enviado de meu C6602 usando Tapatalk


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Collect statistic data from Genesys Stat server
« Reply #4 on: July 15, 2015, 06:37:34 PM »
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


Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: Collect statistic data from Genesys Stat server
« Reply #5 on: July 15, 2015, 08:29:11 PM »
You will need to specify proper masks when you define statistic.
And you really will need to have access to logs.

Offline callmevijayc

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: Collect statistic data from Genesys Stat server
« Reply #6 on: July 16, 2015, 02:43:53 AM »
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..

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Collect statistic data from Genesys Stat server
« Reply #7 on: July 17, 2015, 07:46:39 AM »
I do not see any fragment of code where you connect to the StatServer, send the request and consume the response.

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 126
  • Karma: 13
Re: Collect statistic data from Genesys Stat server
« Reply #8 on: July 27, 2015, 03:52:55 PM »
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:

[code]           
            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);[/code]