Interface MonitoringApi


  • public interface MonitoringApi
    APi exposed by the Performance Monitoring Server.
    • Field Detail

      • CLIENT_API_OBJECT_NAME

        static final java.lang.String CLIENT_API_OBJECT_NAME
        See Also:
        Constant Field Values
      • MAXSAMPLEGAP_MULTIPLIER_PROPERTY

        static final java.lang.String MAXSAMPLEGAP_MULTIPLIER_PROPERTY
        See Also:
        Constant Field Values
    • Method Detail

      • listMetrics

        java.util.List<Metric> listMetrics()
        List all of the metrics available.
      • listMetricInstances

        java.util.List<MetricInstance> listMetricInstances()
        List all of the metric instances available.
      • getMetric

        Metric getMetric​(long id)
        Returns:
        the Metric with the id
      • getMetricByName

        Metric getMetricByName​(java.lang.String name)
        Returns:
        the Metric with the given name
      • getDerivedMetricDefinitions

        java.util.Map<java.lang.Long,​DerivedMetricDefinition> getDerivedMetricDefinitions()
        Returns:
        a map of derived metric ids to the DerivedMetricDefinitions used to create them
      • getMetricInstance

        MetricInstance getMetricInstance​(long id)
        Returns:
        the MetricInstance with the id
      • getMetricInstanceByName

        java.util.List<MetricInstance> getMetricInstanceByName​(java.lang.String name)
        Returns:
        all metric instances of the named metric
      • getDataByMetricInstance

        java.util.Map<java.lang.Long,​MetricData> getDataByMetricInstance​(java.util.Date start,
                                                                               java.util.Date end,
                                                                               long period,
                                                                               long... ids)
        Gets a map of metric instances and their data for a time range and a period that indicates what resolution of data is required.
        Parameters:
        start - time of first metric to request. null = beginning of time, inclusive
        end - last time of metric to request. null = now, exclusive
        period - the interval on which data points should be returned. any number <= 0 means to return all points in the specified time range without any aggregated calculation.
        ids - the list of MetricInstance ids
        Returns:
        a map of metric instance to data
      • getDataByMetricInstance

        java.util.Map<java.lang.Long,​MetricData> getDataByMetricInstance​(java.util.Date start,
                                                                               java.util.Date end,
                                                                               long period,
                                                                               SummaryType summaryType,
                                                                               long... ids)
        Gets a map of metric instances and their data for a time range and a period that indicates what resolution of data is required.
        Parameters:
        start - time of first metric to request. null = beginning of time, inclusive
        end - last time of metric to request. null = now, exclusive
        period - the interval on which data points should be returned. any number <= 0 means to return all points in the specified time range without any aggregated calculation.
        summaryType - the type of summarization desired when collapsing data to fit a period
        ids - the list of MetricInstance ids
        Returns:
        a map of metric instance to data
      • getLastDataByMetric

        java.util.Map<java.lang.Long,​java.util.List<MetricData>> getLastDataByMetric​(long... ids)
        Returns:
        a map of metricId to the last MetricData captured for each instance of each metric, useful for real time monitoring, stat display, etc.
      • getLastDataByMetricInstance

        java.util.Map<java.lang.Long,​MetricData> getLastDataByMetricInstance​(long... ids)
        Returns:
        a map of metricInstanceId to the last MetricData captured for each instance, useful for real time monitoring, stat display, etc.
      • getDataDateRange

        java.util.Date[] getDataDateRange()
        Returns:
        the minimum and maximum dates for existing performance data