Describes how to combine multiple time series to provide a different
view of the data. Aggregation of time series is done in two steps.
First, each time series in the set is aligned to the same time
interval boundaries, then the set of time series is optionally
reduced in number. Alignment consists of applying the
per_series_aligner
operation to each time series after its data
has been divided into regular alignment_period
time intervals.
This process takes all of the data points in an alignment period,
applies a mathematical transformation such as averaging, minimum,
maximum, delta, etc., and converts them into a single data point per
period. Reduction is when the aligned and transformed time series can
optionally be combined, reducing the number of time series through
similar mathematical transformations. Reduction involves applying a
cross_series_reducer
to all the time series, optionally sorting
the time series into subsets with group_by_fields
, and applying
the reducer to each subset. The raw time series data can contain a
huge amount of information from multiple sources. Alignment and
reduction transforms this mass of data into a more manageable and
representative collection of data, for example "the 95% latency across
the average of all tasks in a cluster". This representative data can
be more easily graphed and comprehended, and the individual time
series data is still available for later drilldown. For more details,
see Filtering and aggregation
<https://cloud.google.com/monitoring/api/v3/aggregation>
__.
.. attribute:: alignment_period
The alignment_period
specifies a time interval, in
seconds, that is used to divide the data in all the [time
series][google.monitoring.v3.TimeSeries] into consistent
blocks of time. This will be done before the per-series
aligner can be applied to the data. The value must be at
least 60 seconds. If a per-series aligner other than
ALIGN_NONE
is specified, this field is required or an
error is returned. If no per-series aligner is specified, or
the aligner ALIGN_NONE
is specified, then this field is
ignored.
The reduction operation to be used to combine time series into
a single time series, where the value of each data point in
the resulting series is a function of all the already aligned
values in the input time series. Not all reducer operations
can be applied to all time series. The valid choices depend on
the metric_kind
and the value_type
of the original
time series. Reduction can yield a time series with a
different metric_kind
or value_type
than the input
time series. Time series data must first be aligned (see
per_series_aligner
) in order to perform cross-time series
reduction. If cross_series_reducer
is specified, then
per_series_aligner
must be specified, and must not be
ALIGN_NONE
. An alignment_period
must also be
specified; otherwise, an error is returned.