Get Metric (Time Series) On Resources

Gets the details of metric behavior at a certain time period. There are three common examples that show how to get metric data based on a specific time series.

  1. Time series type (RealTime):
https://{api-url}/api/v2/metric/search?tenant=client_20&rtype=DEVICE&resource=ab342123-5bfb-434c-aae4-03611ca020d9&metric=system.cpu.utilization&startTime=1536643494&endTime=1536661494&timeseries_type=RealTime
  1. Time series type (CHANGE_DETECTION):
https://{api-url}/api/v2/metric/search?tenant=client_20&rtype=DEVICE&resource=ab342123-5bfb-434c-aae4-03611ca020d9&metric=system.cpu.utilization&startTime=1536643494&endTime=1536661494&timeseries_type=CHANGE_DETECTION
  1. Time series type (FORECAST):
https://{api-url}/api/v2/metric/search?tenant=client_20&rtype=DEVICE&resource=ab342123-5bfb-434c-aae4-03611ca020d9

Data resolution

OpsRamp retains the raw metrics data for the most recent seven. Metric roll-ups are computed every half-hour, hourly, and daily. Calculations performed include average, minimum, maximum, and latest. Based on the selected time range, data is dynamically served in raw and rolled-up formats.

Time Range Resolution Time Series Sections
Up to 24 hours Raw data (RAW)
Greater than 24 hours to 3 days 30-minute rollup data (AVG), minVals (MIN), maxVals(MAX) and lastVals(LATEST / LAST)
Greater than 3 days to 30 days 1-hour rollup data (AVG), minVals (MIN), maxVals(MAX) and lastVals(LATEST / LAST)
Greater than 30 days 1-day rollup data (AVG), minVals (MIN), maxVals(MAX) and lastVals(LATEST / LAST)
Using "data=raw" query param Raw (up to 7 days) data (RAW)

Sample responses

To get metric behavior at multiple time series patterns: example-multiple-time-series

To get metric behavior at current time stamp in real time: example-current-real-time

To get significant changes on a metric (using CHANGE_DETECTION): example-change-detection

To forecast values of a metric (using FORECAST): example-forecast

Roll-ups enables the viewing of metric behavior in wider time spans.

When OpsRamp receives data points for a given time series, this data is accumulated for specific periods of time. This data is stored in four roll-ups for each interval: average, minimum, maximum, and latest.

To get metric data for a roll-up time series: example-roll-up

get
/api/v2/metric/search

Path Parameters

    Query Parameters

    • tenantstring

      ID of the client with which a metric is associated with.

    • rtypestring

    • resourcestring

      ID of the resource on which a metric is assigned.

    • metricstring

      Name of the metric to report the metric details.

    • startTimestring

      Search for the metric behavior within a specific time stamp with the start time (use the Unix Epoch Time Stamp format). Example: 1536643494

    • endTimestring

      The end time used for the search (use the Unix Epoch Time Stamp format). Example: 1536643564

    • timeseries_typestring

      Metric behavior at a specific time series pattern. Supported values are: - "RealTime": Provides details of metric behavior at current time stamp. - "CHANGE_DETECTION": Provides details of significant changes on a metric. - "FORECAST": Provides forecast details of a metric

    • metricGroupstring

      ID of a metric group to which a metric belongs.

    • resourceGroupstring

      ID of resource group the metric is applied. Use Get Minimal Details of Device Groups API to get list of resource groups.

    • componentstring

      Device component name that the metric is assigned.

    00