Class: Google::Monitoring::V3::Aggregation

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/common.rb

Overview

Describes how to combine multiple time series to provide different views of the data. Aggregation consists of an alignment step on individual time series (+per_series_aligner+) followed by an optional reduction of the data across different time series (+cross_series_reducer+). For more details, see Aggregation.

Defined Under Namespace

Modules: Aligner, Reducer

Instance Attribute Summary collapse

Instance Attribute Details

#alignment_periodGoogle::Protobuf::Duration

Returns The alignment period for per-time series alignment. If present, +alignmentPeriod+ must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If +perSeriesAligner+ is not specified or equals +ALIGN_NONE+, then this field is ignored. If +perSeriesAligner+ is specified and does not equal +ALIGN_NONE+, then this field must be defined; otherwise an error is returned.

Returns:

  • (Google::Protobuf::Duration)

    The alignment period for per-time series alignment. If present, +alignmentPeriod+ must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If +perSeriesAligner+ is not specified or equals +ALIGN_NONE+, then this field is ignored. If +perSeriesAligner+ is specified and does not equal +ALIGN_NONE+, then this field must be defined; otherwise an error is returned.



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/common.rb', line 108

class Aggregation
  # The Aligner describes how to bring the data points in a single
  # time series into temporal alignment.
  module Aligner
    # No alignment. Raw data is returned. Not valid if cross-time
    # series reduction is requested. The value type of the result is
    # the same as the value type of the input.
    ALIGN_NONE = 0

    # Align and convert to delta metric type. This alignment is valid
    # for cumulative metrics and delta metrics. Aligning an existing
    # delta metric to a delta metric requires that the alignment
    # period be increased. The value type of the result is the same
    # as the value type of the input.
    ALIGN_DELTA = 1

    # Align and convert to a rate. This alignment is valid for
    # cumulative metrics and delta metrics with numeric values. The output is a
    # gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_RATE = 2

    # Align by interpolating between adjacent points around the
    # period boundary. This alignment is valid for gauge
    # metrics with numeric values. The value type of the result is the same
    # as the value type of the input.
    ALIGN_INTERPOLATE = 3

    # Align by shifting the oldest data point before the period
    # boundary to the boundary. This alignment is valid for gauge
    # metrics. The value type of the result is the same as the
    # value type of the input.
    ALIGN_NEXT_OLDER = 4

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the minimum of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # values. The value type of the result is the same as the value
    # type of the input.
    ALIGN_MIN = 10

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the maximum of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # values. The value type of the result is the same as the value
    # type of the input.
    ALIGN_MAX = 11

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the average or arithmetic mean of all
    # data points in the period. This alignment is valid for gauge and delta
    # metrics with numeric values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_MEAN = 12

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the count of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # or Boolean values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    ALIGN_COUNT = 13

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the sum of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # and distribution values. The value type of the output is the
    # same as the value type of the input.
    ALIGN_SUM = 14

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the standard deviation of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with numeric values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_STDDEV = 15

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the count of True-valued data points in the
    # period. This alignment is valid for gauge metrics with
    # Boolean values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    ALIGN_COUNT_TRUE = 16

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the fraction of True-valued data points in the
    # period. This alignment is valid for gauge metrics with Boolean values.
    # The output value is in the range [0, 1] and has value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_FRACTION_TRUE = 17

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 99th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_99 = 18

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 95th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_95 = 19

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 50th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_50 = 20

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 5th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_05 = 21
  end

  # A Reducer describes how to aggregate data points from multiple
  # time series into a single time series.
  module Reducer
    # No cross-time series reduction. The output of the aligner is
    # returned.
    REDUCE_NONE = 0

    # Reduce by computing the mean across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric or distribution values. The value type of the
    # output is {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    REDUCE_MEAN = 1

    # Reduce by computing the minimum across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric values. The value type of the output
    # is the same as the value type of the input.
    REDUCE_MIN = 2

    # Reduce by computing the maximum across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric values. The value type of the output
    # is the same as the value type of the input.
    REDUCE_MAX = 3

    # Reduce by computing the sum across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric and distribution values. The value type of
    # the output is the same as the value type of the input.
    REDUCE_SUM = 4

    # Reduce by computing the standard deviation across time series
    # for each alignment period. This reducer is valid for delta
    # and gauge metrics with numeric or distribution values. The value type of
    # the output is {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    REDUCE_STDDEV = 5

    # Reduce by computing the count of data points across time series
    # for each alignment period. This reducer is valid for delta
    # and gauge metrics of numeric, Boolean, distribution, and string value
    # type. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    REDUCE_COUNT = 6

    # Reduce by computing the count of True-valued data points across time
    # series for each alignment period. This reducer is valid for delta
    # and gauge metrics of Boolean value type. The value type of
    # the output is {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    REDUCE_COUNT_TRUE = 7

    # Reduce by computing the fraction of True-valued data points across time
    # series for each alignment period. This reducer is valid for delta
    # and gauge metrics of Boolean value type. The output value is in the
    # range [0, 1] and has value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    REDUCE_FRACTION_TRUE = 8

    # Reduce by computing 99th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_99 = 9

    # Reduce by computing 95th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_95 = 10

    # Reduce by computing 50th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_50 = 11

    # Reduce by computing 5th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_05 = 12
  end
end

#cross_series_reducerGoogle::Monitoring::V3::Aggregation::Reducer

The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.

Time series data must be aligned in order to perform cross-time series reduction. If +crossSeriesReducer+ is specified, then +perSeriesAligner+ must be specified and not equal +ALIGN_NONE+ and +alignmentPeriod+ must be specified; otherwise, an error is returned.

Returns:

  • (Google::Monitoring::V3::Aggregation::Reducer)

    The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.

    Time series data must be aligned in order to perform cross-time series reduction. If +crossSeriesReducer+ is specified, then +perSeriesAligner+ must be specified and not equal +ALIGN_NONE+ and +alignmentPeriod+ must be specified; otherwise, an error is returned.



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/common.rb', line 108

class Aggregation
  # The Aligner describes how to bring the data points in a single
  # time series into temporal alignment.
  module Aligner
    # No alignment. Raw data is returned. Not valid if cross-time
    # series reduction is requested. The value type of the result is
    # the same as the value type of the input.
    ALIGN_NONE = 0

    # Align and convert to delta metric type. This alignment is valid
    # for cumulative metrics and delta metrics. Aligning an existing
    # delta metric to a delta metric requires that the alignment
    # period be increased. The value type of the result is the same
    # as the value type of the input.
    ALIGN_DELTA = 1

    # Align and convert to a rate. This alignment is valid for
    # cumulative metrics and delta metrics with numeric values. The output is a
    # gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_RATE = 2

    # Align by interpolating between adjacent points around the
    # period boundary. This alignment is valid for gauge
    # metrics with numeric values. The value type of the result is the same
    # as the value type of the input.
    ALIGN_INTERPOLATE = 3

    # Align by shifting the oldest data point before the period
    # boundary to the boundary. This alignment is valid for gauge
    # metrics. The value type of the result is the same as the
    # value type of the input.
    ALIGN_NEXT_OLDER = 4

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the minimum of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # values. The value type of the result is the same as the value
    # type of the input.
    ALIGN_MIN = 10

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the maximum of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # values. The value type of the result is the same as the value
    # type of the input.
    ALIGN_MAX = 11

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the average or arithmetic mean of all
    # data points in the period. This alignment is valid for gauge and delta
    # metrics with numeric values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_MEAN = 12

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the count of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # or Boolean values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    ALIGN_COUNT = 13

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the sum of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # and distribution values. The value type of the output is the
    # same as the value type of the input.
    ALIGN_SUM = 14

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the standard deviation of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with numeric values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_STDDEV = 15

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the count of True-valued data points in the
    # period. This alignment is valid for gauge metrics with
    # Boolean values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    ALIGN_COUNT_TRUE = 16

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the fraction of True-valued data points in the
    # period. This alignment is valid for gauge metrics with Boolean values.
    # The output value is in the range [0, 1] and has value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_FRACTION_TRUE = 17

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 99th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_99 = 18

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 95th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_95 = 19

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 50th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_50 = 20

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 5th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_05 = 21
  end

  # A Reducer describes how to aggregate data points from multiple
  # time series into a single time series.
  module Reducer
    # No cross-time series reduction. The output of the aligner is
    # returned.
    REDUCE_NONE = 0

    # Reduce by computing the mean across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric or distribution values. The value type of the
    # output is {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    REDUCE_MEAN = 1

    # Reduce by computing the minimum across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric values. The value type of the output
    # is the same as the value type of the input.
    REDUCE_MIN = 2

    # Reduce by computing the maximum across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric values. The value type of the output
    # is the same as the value type of the input.
    REDUCE_MAX = 3

    # Reduce by computing the sum across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric and distribution values. The value type of
    # the output is the same as the value type of the input.
    REDUCE_SUM = 4

    # Reduce by computing the standard deviation across time series
    # for each alignment period. This reducer is valid for delta
    # and gauge metrics with numeric or distribution values. The value type of
    # the output is {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    REDUCE_STDDEV = 5

    # Reduce by computing the count of data points across time series
    # for each alignment period. This reducer is valid for delta
    # and gauge metrics of numeric, Boolean, distribution, and string value
    # type. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    REDUCE_COUNT = 6

    # Reduce by computing the count of True-valued data points across time
    # series for each alignment period. This reducer is valid for delta
    # and gauge metrics of Boolean value type. The value type of
    # the output is {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    REDUCE_COUNT_TRUE = 7

    # Reduce by computing the fraction of True-valued data points across time
    # series for each alignment period. This reducer is valid for delta
    # and gauge metrics of Boolean value type. The output value is in the
    # range [0, 1] and has value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    REDUCE_FRACTION_TRUE = 8

    # Reduce by computing 99th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_99 = 9

    # Reduce by computing 95th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_95 = 10

    # Reduce by computing 50th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_50 = 11

    # Reduce by computing 5th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_05 = 12
  end
end

#group_by_fieldsArray<String>

Returns The set of fields to preserve when +crossSeriesReducer+ is specified. The +groupByFields+ determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The +crossSeriesReducer+ is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains +resource.type+. Fields not specified in +groupByFields+ are aggregated away. If +groupByFields+ is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If +crossSeriesReducer+ is not defined, this field is ignored.

Returns:

  • (Array<String>)

    The set of fields to preserve when +crossSeriesReducer+ is specified. The +groupByFields+ determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The +crossSeriesReducer+ is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains +resource.type+. Fields not specified in +groupByFields+ are aggregated away. If +groupByFields+ is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If +crossSeriesReducer+ is not defined, this field is ignored.



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/common.rb', line 108

class Aggregation
  # The Aligner describes how to bring the data points in a single
  # time series into temporal alignment.
  module Aligner
    # No alignment. Raw data is returned. Not valid if cross-time
    # series reduction is requested. The value type of the result is
    # the same as the value type of the input.
    ALIGN_NONE = 0

    # Align and convert to delta metric type. This alignment is valid
    # for cumulative metrics and delta metrics. Aligning an existing
    # delta metric to a delta metric requires that the alignment
    # period be increased. The value type of the result is the same
    # as the value type of the input.
    ALIGN_DELTA = 1

    # Align and convert to a rate. This alignment is valid for
    # cumulative metrics and delta metrics with numeric values. The output is a
    # gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_RATE = 2

    # Align by interpolating between adjacent points around the
    # period boundary. This alignment is valid for gauge
    # metrics with numeric values. The value type of the result is the same
    # as the value type of the input.
    ALIGN_INTERPOLATE = 3

    # Align by shifting the oldest data point before the period
    # boundary to the boundary. This alignment is valid for gauge
    # metrics. The value type of the result is the same as the
    # value type of the input.
    ALIGN_NEXT_OLDER = 4

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the minimum of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # values. The value type of the result is the same as the value
    # type of the input.
    ALIGN_MIN = 10

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the maximum of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # values. The value type of the result is the same as the value
    # type of the input.
    ALIGN_MAX = 11

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the average or arithmetic mean of all
    # data points in the period. This alignment is valid for gauge and delta
    # metrics with numeric values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_MEAN = 12

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the count of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # or Boolean values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    ALIGN_COUNT = 13

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the sum of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # and distribution values. The value type of the output is the
    # same as the value type of the input.
    ALIGN_SUM = 14

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the standard deviation of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with numeric values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_STDDEV = 15

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the count of True-valued data points in the
    # period. This alignment is valid for gauge metrics with
    # Boolean values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    ALIGN_COUNT_TRUE = 16

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the fraction of True-valued data points in the
    # period. This alignment is valid for gauge metrics with Boolean values.
    # The output value is in the range [0, 1] and has value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_FRACTION_TRUE = 17

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 99th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_99 = 18

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 95th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_95 = 19

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 50th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_50 = 20

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 5th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_05 = 21
  end

  # A Reducer describes how to aggregate data points from multiple
  # time series into a single time series.
  module Reducer
    # No cross-time series reduction. The output of the aligner is
    # returned.
    REDUCE_NONE = 0

    # Reduce by computing the mean across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric or distribution values. The value type of the
    # output is {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    REDUCE_MEAN = 1

    # Reduce by computing the minimum across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric values. The value type of the output
    # is the same as the value type of the input.
    REDUCE_MIN = 2

    # Reduce by computing the maximum across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric values. The value type of the output
    # is the same as the value type of the input.
    REDUCE_MAX = 3

    # Reduce by computing the sum across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric and distribution values. The value type of
    # the output is the same as the value type of the input.
    REDUCE_SUM = 4

    # Reduce by computing the standard deviation across time series
    # for each alignment period. This reducer is valid for delta
    # and gauge metrics with numeric or distribution values. The value type of
    # the output is {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    REDUCE_STDDEV = 5

    # Reduce by computing the count of data points across time series
    # for each alignment period. This reducer is valid for delta
    # and gauge metrics of numeric, Boolean, distribution, and string value
    # type. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    REDUCE_COUNT = 6

    # Reduce by computing the count of True-valued data points across time
    # series for each alignment period. This reducer is valid for delta
    # and gauge metrics of Boolean value type. The value type of
    # the output is {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    REDUCE_COUNT_TRUE = 7

    # Reduce by computing the fraction of True-valued data points across time
    # series for each alignment period. This reducer is valid for delta
    # and gauge metrics of Boolean value type. The output value is in the
    # range [0, 1] and has value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    REDUCE_FRACTION_TRUE = 8

    # Reduce by computing 99th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_99 = 9

    # Reduce by computing 95th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_95 = 10

    # Reduce by computing 50th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_50 = 11

    # Reduce by computing 5th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_05 = 12
  end
end

#per_series_alignerGoogle::Monitoring::V3::Aggregation::Aligner

The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.

Time series data must be aligned in order to perform cross-time series reduction. If +crossSeriesReducer+ is specified, then +perSeriesAligner+ must be specified and not equal +ALIGN_NONE+ and +alignmentPeriod+ must be specified; otherwise, an error is returned.

Returns:

  • (Google::Monitoring::V3::Aggregation::Aligner)

    The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.

    Time series data must be aligned in order to perform cross-time series reduction. If +crossSeriesReducer+ is specified, then +perSeriesAligner+ must be specified and not equal +ALIGN_NONE+ and +alignmentPeriod+ must be specified; otherwise, an error is returned.



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/common.rb', line 108

class Aggregation
  # The Aligner describes how to bring the data points in a single
  # time series into temporal alignment.
  module Aligner
    # No alignment. Raw data is returned. Not valid if cross-time
    # series reduction is requested. The value type of the result is
    # the same as the value type of the input.
    ALIGN_NONE = 0

    # Align and convert to delta metric type. This alignment is valid
    # for cumulative metrics and delta metrics. Aligning an existing
    # delta metric to a delta metric requires that the alignment
    # period be increased. The value type of the result is the same
    # as the value type of the input.
    ALIGN_DELTA = 1

    # Align and convert to a rate. This alignment is valid for
    # cumulative metrics and delta metrics with numeric values. The output is a
    # gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_RATE = 2

    # Align by interpolating between adjacent points around the
    # period boundary. This alignment is valid for gauge
    # metrics with numeric values. The value type of the result is the same
    # as the value type of the input.
    ALIGN_INTERPOLATE = 3

    # Align by shifting the oldest data point before the period
    # boundary to the boundary. This alignment is valid for gauge
    # metrics. The value type of the result is the same as the
    # value type of the input.
    ALIGN_NEXT_OLDER = 4

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the minimum of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # values. The value type of the result is the same as the value
    # type of the input.
    ALIGN_MIN = 10

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the maximum of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # values. The value type of the result is the same as the value
    # type of the input.
    ALIGN_MAX = 11

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the average or arithmetic mean of all
    # data points in the period. This alignment is valid for gauge and delta
    # metrics with numeric values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_MEAN = 12

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the count of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # or Boolean values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    ALIGN_COUNT = 13

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the sum of all data points in the
    # period. This alignment is valid for gauge and delta metrics with numeric
    # and distribution values. The value type of the output is the
    # same as the value type of the input.
    ALIGN_SUM = 14

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the standard deviation of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with numeric values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_STDDEV = 15

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the count of True-valued data points in the
    # period. This alignment is valid for gauge metrics with
    # Boolean values. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    ALIGN_COUNT_TRUE = 16

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the fraction of True-valued data points in the
    # period. This alignment is valid for gauge metrics with Boolean values.
    # The output value is in the range [0, 1] and has value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_FRACTION_TRUE = 17

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 99th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_99 = 18

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 95th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_95 = 19

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 50th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_50 = 20

    # Align time series via aggregation. The resulting data point in
    # the alignment period is the 5th percentile of all data
    # points in the period. This alignment is valid for gauge and delta metrics
    # with distribution values. The output is a gauge metric with value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    ALIGN_PERCENTILE_05 = 21
  end

  # A Reducer describes how to aggregate data points from multiple
  # time series into a single time series.
  module Reducer
    # No cross-time series reduction. The output of the aligner is
    # returned.
    REDUCE_NONE = 0

    # Reduce by computing the mean across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric or distribution values. The value type of the
    # output is {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    REDUCE_MEAN = 1

    # Reduce by computing the minimum across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric values. The value type of the output
    # is the same as the value type of the input.
    REDUCE_MIN = 2

    # Reduce by computing the maximum across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric values. The value type of the output
    # is the same as the value type of the input.
    REDUCE_MAX = 3

    # Reduce by computing the sum across time series for each
    # alignment period. This reducer is valid for delta and
    # gauge metrics with numeric and distribution values. The value type of
    # the output is the same as the value type of the input.
    REDUCE_SUM = 4

    # Reduce by computing the standard deviation across time series
    # for each alignment period. This reducer is valid for delta
    # and gauge metrics with numeric or distribution values. The value type of
    # the output is {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    REDUCE_STDDEV = 5

    # Reduce by computing the count of data points across time series
    # for each alignment period. This reducer is valid for delta
    # and gauge metrics of numeric, Boolean, distribution, and string value
    # type. The value type of the output is
    # {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    REDUCE_COUNT = 6

    # Reduce by computing the count of True-valued data points across time
    # series for each alignment period. This reducer is valid for delta
    # and gauge metrics of Boolean value type. The value type of
    # the output is {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
    REDUCE_COUNT_TRUE = 7

    # Reduce by computing the fraction of True-valued data points across time
    # series for each alignment period. This reducer is valid for delta
    # and gauge metrics of Boolean value type. The output value is in the
    # range [0, 1] and has value type
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
    REDUCE_FRACTION_TRUE = 8

    # Reduce by computing 99th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_99 = 9

    # Reduce by computing 95th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_95 = 10

    # Reduce by computing 50th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_50 = 11

    # Reduce by computing 5th percentile of data points across time series
    # for each alignment period. This reducer is valid for gauge and delta
    # metrics of numeric and distribution type. The value of the output is
    # {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}
    REDUCE_PERCENTILE_05 = 12
  end
end