Time override

Overview

Time override allows you to specify a different time range for each metric in the query. If it is not specified, the reference time of the query is used in each metric. It is specifically useful if one wants to compare values taken by the series on different time intervals. It will be typically used in conjunction with a time align aggregator.

Description

Time override can be specified exactly the same way as the query reference time. Only one time override can be specified for each metric. To have the values of the same series at different time intervals, the corresponding metric should be duplicated with different time overrides for each copy.

../_images/time-override-ui.png

Usage in API

The time override is specified in an object in the time_override attribute of the metric. The global structure of the time override is the same as for the global time parameters of the query.

As a reminder:

You must specify either start_absolute or start_relative but not both. Similarly, you may specify either end_absolute or end_relative but not both. If either end time is not specified the current date and time is assumed.

  • start_absolute The time in milliseconds.

  • start_relative The relative start time is the current date and time minus the specified value and unit. Possible unit values are “milliseconds”, “seconds”, “minutes”, “hours”, “days”, “weeks”, “months”, and “years”. For example, if the start time is 5 minutes, the query will return all matching data points for the last 5 minutes.

  • end_absolute The time in milliseconds. This must be later in time than the start time. If not specified, the end time is assumed to be the current date and time.

  • end_relative The relative end time is the current date and time minus the specified value and unit. Possible unit values are “milliseconds”, “seconds”, “minutes”, “hours”, “days”, “weeks”, “months”, and “years”. For example, if the start time is 30 minutes and the end time is 10 minutes, the query returns matching data points that occurred between the last 30 minutes up to and including the last 10 minutes. If not specified, the end time is assumed to the current date and time.