Skip to main content

Retrieve aggregated metric data for multiple counters

POST 

/query/metric/aggregations

This endpoint retrieves aggregated historical data for multiple specified metrics over a given timeline. The data is aggregated using methods such as avg (average), sum, min, max, or count, based on the user's request. Users can specify multiple data points (e.g., system.cpu.percent, system.memory.used.percent) along with the entity type (e.g., monitor) and a list of specific entities. Additionally, the timeline for the data can be customized, allowing users to fetch both current and historical data. Unlike the histogram API, this endpoint returns aggregated values rather than time series data, providing a summary view of the metrics based on the selected parameters.

Request

Body

required
    queries object[]required

    A list of queries to retrieve data for multiple metrics. Each query can specify the aggregator, data point, and entity type. To query multiple metrics, add additional query objects, each containing these parameters.

  • Array [
  • aggregator stringrequired

    The method of aggregation for the data points, such as 'avg', 'sum', 'min', 'max', and 'count'

    data.point stringrequired

    The specific metric or data point to query, for example, 'system.cpu.percent'.

    entity.type string

    The type of entity for which data is being retrieved, for example, 'monitor'.

    entities integer[]

    The specific entity IDs to query the data for. The ID could be a Monitor ID, Group ID, or a Tag value based on the 'entity.type' you have selected

  • ]
  • timeline objectrequired

    Defines the time range for the data being retrieved. This includes the start and end dates and times.

    from.date daterequired

    The start date for the data retrieval.

    from.time timerequired

    The start time for the data retrieval.

    to.date daterequired

    The end date for the data retrieval.

    to.time timerequired

    The end time for the data retrieval.

    type stringrequired

    Specifies the type of data to be retrieved, such as 'metric'. The possible type of data that can be retrieved are 'metric' and 'availability'.

    result.by string[]required

    An array of strings specifying how the results should be grouped, The possible values are 'monitor', 'tag', 'group', and 'instance'.

Responses

Successfully retrieved Historical data with respect to data point with specific aggregator and specific entity type.

Schema
    oneOf
    response-code integer
    status string
    result object[]
  • Array [
  • monitor stringrequired
    system.cpu.percent^avg integer
    system.running.processes^avg integer
    system.disk.read.bytes^avg integer
  • ]
Loading...