Genesys Engage on-premises

 View Only

Discussion Thread View
  • 1.  Stat server statistic fetching issue from PSDK

    Posted 03-13-2019 05:28
    Hi Team,
    I am trying to fetch QueueAverageWaitingTime from Virtual Queue.
    I am able to connect with stat server ,able to open statistics. but at the time of response getting below error

    response = {'EventError' ('1')
    message attributes:
    REQ_ID [int] = 2
    USER_REQ_ID [int] = 0
    TM_SERVER [int] = 1552465103
    TM_LENGTH [int] = 0
    LONG_VALUE [int] = 1
    STRING_VALUE [str] = "Switch is not found on Tenant 'Environment'"
    }

    PSDK code
    RequestOpenStatistic reqOpenStat = RequestOpenStatistic.Create();
    reqOpenStat.StatisticObject = StatisticObject.Create();
    reqOpenStat.StatisticObject.ObjectId = "GMS_VQ_agc_sip_switch";
    reqOpenStat.StatisticObject.ObjectType = StatisticObjectType.Queue;
    reqOpenStat.StatisticObject.TenantName = "Environment";
    reqOpenStat.StatisticObject.TenantPassword = "";

    reqOpenStat.StatisticMetric = StatisticMetric.Create();
    reqOpenStat.StatisticMetric.StatisticType = "QueueAverageWaitingTime";
    reqOpenStat.StatisticMetric.TimeProfile = "Default";
    reqOpenStat.Notification = Notification.Create();
    #Integrations

    ------------------------------
    DEEPTI SRIVASTAVA
    AGC networks Australia Pty Ltd
    ------------------------------


  • 2.  RE: Stat server statistic fetching issue from PSDK

    Posted 03-13-2019 09:23
    change your 'tenant' value to 'Resources' - capital 'R'​

    ------------------------------
    Todd McCall
    Bank of America
    ------------------------------



  • 3.  RE: Stat server statistic fetching issue from PSDK

    Posted 03-14-2019 02:07

    Getting the same error with resources:-

    response = {'EventError' ('1')

    message attributes:

    REQ_ID [int]    = 2

    USER_REQ_ID [int] = 0

    TM_SERVER [int] = 1552543471

    TM_LENGTH [int] = 0

    LONG_VALUE [int] = 1

    STRING_VALUE [str] = "Tenant 'Resources' not found"

    }

     






  • 4.  RE: Stat server statistic fetching issue from PSDK

    Posted 03-14-2019 04:02
    I don't know if it's just the way your code has pasted across, but I believe your ObjectId needs to @ symbol for it to work.  eg. GMS_VQ@agc_sip_switch assuming your switch is called agc_sip_switch.
    And of course the switch should be defined at the Environment level if that's the Tenant your defining.


    ------------------------------
    Jason Mclennan
    Commonwealth Bank of Australia
    ------------------------------



  • 5.  RE: Stat server statistic fetching issue from PSDK

    Posted 03-14-2019 05:03

    I have changed ObjectID from GMS_VQ_agc_sip_switch to GMS_VQ@agc_sip_switch.

    Now Statistic is opening but not getting complete message attribute(QueueAverageWaitingTime exact value). What I suppose to do for getting complete message attributes.

     

    response = {'EventStatisticOpened' ('22')

    message attributes:

    REQ_ID [int]    = 2

    USER_REQ_ID [int] = 0

    TM_SERVER [int] = 1552553909

    TM_LENGTH [int] = 0

    LONG_VALUE [int] = 0

    }

     






  • 6.  RE: Stat server statistic fetching issue from PSDK

    Posted 03-14-2019 10:58
    Page 213 of Platform SDK Developer's Guide

    A Typical Statistics Application
    There are many ways in which you might need to use data from Stat Server, but in most cases, you will use three
    types of requests:
    • RequestOpenStatistic and RequestOpenStatisticEx are used to ask Stat Server to start sending statistical
    information to your application. RequestOpenStatistic allows you to request information about a statistic that has
    already been defined in the Genesys Configuration Layer, while you can use RequestOpenStatisticEx to define
    your own statistics dynamically.
    • You can use RequestPeekStatistic to get the value of a statistic that has already been opened using either
    RequestOpenStatistic or RequestOpenStatisticEx. Since it can take a while for certain types of statistical
    information to be sent to your application, this can be useful if you are writing an application-such as a wallboard
    application, for instance-for which you would like statistical values to be displayed immediately.
    • Use RequestCloseStatistic to tell Stat Server that you no longer need information about a particular statistic.

    ------------------------------
    Todd McCall
    Bank of America
    ------------------------------



  • 7.  RE: Stat server statistic fetching issue from PSDK

    GENESYS
    Posted 03-15-2019 11:50
    Deepti,

    In the example request that you posted you show that you are creating an instance of 'StatisticMetric'.  That class is used to refer to a named statistic definition that is configured in the options of the Stat Server application.  I doubt that you have a statistic definition there that is named 'QueueAverageWaitingTime' because that is a StatisticType and not the name of a configured statistic.  Per the Platform SDK documentation at https://docs.genesys.com/Documentation/PSDK/latest/Developer/StatServer:

    "Next, you will specify the StatisticType property, which must correspond to the name of the statistic definition that appears in the options tab."

    If you have Genesys Pulse, then you most likely have a statistic definition named 'Average_Wait_Time' defined in the options tab of the Stat Server application object, so that is the name you should specify, but please verify that definition actually exists.

    If you don't want to use named statistic definitions from the Stat Server application options, then you can use the 'StatisticMetricEx' class instead and you can specify a complete statistic definition on-the-fly programmatically.  However, using StatisticMetricEx is much more complex than using a pre-configured statistic definition and requires that you have an in-depth knowledge of how to create a statistic definition, which is kind of a black art.

    Lastly, I noticed that you create an instance of the 'Notification' class, but I don't see that you set up any properties.  Typically you'll setup notifications with a 'Mode' of either 'Immediate' or 'Periodical', depending upon how real-time you need the statistic value and how much load you want to put on stat server (Immediate mode is much more taxing on stat server than Periodical).  If you use 'Periodical' notification, then you also need to set the 'Frequency' property to how many seconds the value should be reported.  By default Pulse uses 60 second notification periods for its reporting of Average Wait Time.  You can also specify the 'Insensitivity' property that indicates how much a value needs to change by before stat server report that the value has changed.  For instance, if you set 'Insensitivity' to 5, then stat server will only report a value change if the value changes by +/- 5.

    Genesys statistics are a complex subject.  If you are going to be doing a lot with statistics, then I would suggest thoroughly reading the Platform SDK Developers Guide (https://docs.genesys.com/Documentation/PSDK/latest/Developer/Welcome) and the Real-Time Metrics Engine User's Guide (https://docs.genesys.com/Documentation/RTME/8.5.1/User/Welcome) to understand all the properties necessary to create a statistic definition and then how those can be specified in the Platform SDK classes.

    Good luck.

    ------------------------------
    Jim Crespino
    Director, Developer Enablement
    Genesys
    https://developer.genesys.com
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources