Monitoring API architecture
You can use the Management Console API to access subscription metrics in categories such as latency, throughput, refresh, and performance.
In order to retrieve monitoring statistic data, you must consider all of the following information:
- The method
getStatisticDefinitions()for aPublisherorSubscriberobject will return the list of supported definitions grouped by categories. EachStatisticCategorycontains the definitions supported by the datastore. - The key attributes of a
StatisticDefinitionidentify how that definition can be used and are defined as follows:Table 1. Definitions of key attributes for StatisticDefinitionAttribute Definition origin StatisticOrigin.SOURCEStatisticOrigin.TARGETStatisticOrigin.SUMMARY(can be source or target)valueFormat StatisticValueFormat.DISCRETE: The value represents the actual value for statistics like total memory.StatisticValueFormat.CUMULATE: The value will be used as a rate, where the data will be provided the units/second that occurred during a single collection interval. - The
SubscriptionandPublicationobjects provide methods to send request for statistics information. All methods take theStatisticDataobject as a parameter that will be populated with data when a response is received.The
requestPerformanceStatistics(PerformanceStatisticData)method requires thePerformanceStatistcDataobject be initialized with aStatisticDefinitionreceived from thePublisherorSubscriberobjects prior to passing to this method. All other methods do not require initialization ofStatisticDatasince they will be initialized with aStatisticDefinitionautomatically.Example for
requestPerformanceStatisticsPerformanceStatisticData statisticData = new PerformanceStatisticData(); … // initialize statisticData, see sample code … requestPerformanceStatistics(statisticData);Example for
requestOperationalStatisticDataPerformanceStatisticData statisticData = new PerformanceStatisticData(); requestOperationalStatisticData(statisticData);Example for
requestRefreshStatisticsRefreshStatisticData statisticData = new RefreshStatisticData(); requestRefreshStatistics(statisticData);Example for
requestBusyTableStatisticsBusyTableStatisticData statisticData = new BusyTableStatisticData(); requestBusyTableStatistics(statisticData); Example for
requestSummaryStatisticsSummaryStatisticData statisticData = new SummaryStatisticData(); requestSummaryStatistics(statisticData);
All methods will send a request to the Publisher or Subscriber object
and load statistic values into the StatisticData object.
These values can be retrieved with the provided methods (see the class
diagram below).
PerformanceStatisticData accumulates statistic
information. Each request appends a new data record to the object.
Each record has a timestamp and array of values corresponding to a StatisticDefinition that
has been initialized for PerformanceStatisticData.
The latest value or specific row value, as well as the maximum, minimum,
total, and average of each StatisticDefinition can
be retrieved from PerformanceStatisticData. By default
there is no limit for the number of records to be stored. However,
data retain duration (time in minutes) can be specified with the setDataRetainDuration(int
minutes) method. Only records with a time stamp within the
specified duration will be retained.
RefreshStatisticData and BusyTableStatisticData only
store the last set of records.
SummaryStatisticData returns the current state
of the subscription.
For more information on the methods in the class diagram below, see the Management Console API javadocs that are installed with Management Console.
