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 a Publisher or Subscriber object will return the list of supported definitions grouped by categories. Each StatisticCategory contains the definitions supported by the datastore.
  • The key attributes of a StatisticDefinition identify how that definition can be used and are defined as follows:
    Table 1. Definitions of key attributes for StatisticDefinition
    Attribute Definition
    origin StatisticOrigin.SOURCE
    StatisticOrigin.TARGET
    StatisticOrigin.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 Subscription and Publication objects provide methods to send request for statistics information. All methods take the StatisticData object as a parameter that will be populated with data when a response is received.

    The requestPerformanceStatistics(PerformanceStatisticData) method requires the PerformanceStatistcData object be initialized with a StatisticDefinition received from the Publisher or Subscriber objects prior to passing to this method. All other methods do not require initialization of StatisticData since they will be initialized with a StatisticDefinition automatically.

    Example for requestPerformanceStatistics

    PerformanceStatisticData statisticData = new PerformanceStatisticData();
    …
    // initialize statisticData, see sample code
    …
    requestPerformanceStatistics(statisticData);

    Example for requestOperationalStatisticData

    PerformanceStatisticData statisticData = new PerformanceStatisticData();
    requestOperationalStatisticData(statisticData);

    Example for requestRefreshStatistics

    RefreshStatisticData statisticData = new RefreshStatisticData();
    requestRefreshStatistics(statisticData);

    Example for requestBusyTableStatistics

    BusyTableStatisticData statisticData = new BusyTableStatisticData();
    requestBusyTableStatistics(statisticData);
  • Example for requestSummaryStatistics

    SummaryStatisticData 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.

Methods of the StatisticData object