Author Topic: StatisticType for a specific object Type  (Read 1444 times)

Offline Harifidy

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
StatisticType for a specific object Type
« on: September 03, 2021, 11:37:03 AM »
Hi all.
I am developing a web application which display statistic of Stat Server.
My question is:
On PSDK, what is the function we use to get all possible StatisticType of a specific Object Type. I mean if I select "Agent", only statistic type about "Agent" are displayed (TotalLoginTime,...)
Thank you.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: StatisticType for a specific object Type
« Reply #1 on: September 04, 2021, 11:18:40 PM »
None
In PSDK you declare which metric you want to apply to an object.
Remember that metrics only became to exist after they are declared at StatServer so it understands what you want to monitor.
There is no a predefined set of ready metrics in StatServer or in PSDK. What you can do maybe is to query StatServer options and capture all that have a Subject equal or is part of the object you are trying to get info from

Offline Harifidy

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
Re: StatisticType for a specific object Type
« Reply #2 on: September 09, 2021, 07:38:46 AM »
Thank you for your reply.
What I have done is:
[code]
requestOpenStatistic.StatisticObject = StatisticObject.Create();
requestOpenStatistic.StatisticObject.ObjectId = "Analyst001";
requestOpenStatistic.StatisticObject.ObjectType = StatisticObjectType.Agent;
requestOpenStatistic.StatisticObject.TenantName = "Environment";
requestOpenStatistic.StatisticObject.TenantPassword = "";

// StaticMetric
requestOpenStatistic.StatisticMetric = StatisticMetric.Create();

[/code]

What should be next? Could you please advise.
Thank you.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: StatisticType for a specific object Type
« Reply #3 on: September 09, 2021, 09:03:40 AM »
What next? It depends on what statistic you want to gather

Offline Harifidy

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
Re: StatisticType for a specific object Type
« Reply #4 on: September 09, 2021, 09:40:10 AM »
If I want to get all possible statistic type of Object Agent, what to do?

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: StatisticType for a specific object Type
« Reply #5 on: September 09, 2021, 10:27:28 AM »
Discover enumerations from Genesyslab.Platform.Reporting.Protocols.StatServer namespace, there you can find all possible values for statistic definition on StatServer level.

Offline Harifidy

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
Re: StatisticType for a specific object Type
« Reply #6 on: September 09, 2021, 11:38:57 AM »
Oki thank you.
I am gonna check this.