I have below 2 metric I am trying to get out (Together it should be displayed on screen).
StatisticObject objectDescription =
new StatisticObject(tenantName,
dn,
StatisticObjectType.RoutePoint);
StatisticMetric statisticMetric =
new StatisticMetric("TotalNumberCallsAband");
statisticMetric.TimeProfile = "CollectorDefault";
Statistic TotalNumberCallsAband =
new Statistic(objectDescription, statisticMetric);
StatisticsCollection statisticsCollection =
new StatisticsCollection();
statisticsCollection.AddStatistic(TotalNumberCallsAband);
Start 2nd metrix
StatisticObject objectDescription1 =
new StatisticObject(tenantName,
dn,
StatisticObjectType.RoutePoint);
StatisticMetric statisticMetric1 =
new StatisticMetric("TotalNumberCallsEntered");
statisticMetric.TimeProfile = "CollectorDefault";
Statistic TotalNumberCallsEntered =
new Statistic(objectDescription, statisticMetric);
StatisticsCollection statisticsCollection1 =
new StatisticsCollection();
statisticsCollection1.AddStatistic(TotalNumberCallsEntered);
getNotification(statisticsCollection);
getNotification(statisticsCollection1);
public void getNotification(StatisticsCollection sc)
{
Notification notification =
Notification.Create(NotificationMode.Periodical, 15);
RequestOpenPackage requestOpenPackage =
RequestOpenPackage.Create(
132,
StatisticType.Historical,
sc,
notification);
protocolManagementService["Stat_Server_App"].Send(requestOpenPackage);
AND I AM TRYINF TO GET DATA IN INT a AS BELOW
private void OnEventPackageInfo(IMessage theMessage)
{
EventPackageInfo packageInfo = theMessage as EventPackageInfo;
if (packageInfo != null)
{
foreach (Statistic statistic in packageInfo.Statistics)
{
a = statistic.IntValue;
}
}
}
Please let me know where I am going wrong
Thanks
Hemant