google-cloud-monitoring-v3 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +71 -0
- data/lib/google-cloud-monitoring-v3.rb +21 -0
- data/lib/google/cloud/monitoring/v3.rb +40 -0
- data/lib/google/cloud/monitoring/v3/alert_policy_service.rb +57 -0
- data/lib/google/cloud/monitoring/v3/alert_policy_service/client.rb +772 -0
- data/lib/google/cloud/monitoring/v3/alert_policy_service/credentials.rb +53 -0
- data/lib/google/cloud/monitoring/v3/alert_policy_service/paths.rb +185 -0
- data/lib/google/cloud/monitoring/v3/group_service.rb +60 -0
- data/lib/google/cloud/monitoring/v3/group_service/client.rb +862 -0
- data/lib/google/cloud/monitoring/v3/group_service/credentials.rb +53 -0
- data/lib/google/cloud/monitoring/v3/group_service/paths.rb +127 -0
- data/lib/google/cloud/monitoring/v3/metric_service.rb +50 -0
- data/lib/google/cloud/monitoring/v3/metric_service/client.rb +1040 -0
- data/lib/google/cloud/monitoring/v3/metric_service/credentials.rb +54 -0
- data/lib/google/cloud/monitoring/v3/metric_service/paths.rb +179 -0
- data/lib/google/cloud/monitoring/v3/notification_channel_service.rb +50 -0
- data/lib/google/cloud/monitoring/v3/notification_channel_service/client.rb +1213 -0
- data/lib/google/cloud/monitoring/v3/notification_channel_service/credentials.rb +53 -0
- data/lib/google/cloud/monitoring/v3/notification_channel_service/paths.rb +179 -0
- data/lib/google/cloud/monitoring/v3/service_monitoring_service.rb +52 -0
- data/lib/google/cloud/monitoring/v3/service_monitoring_service/client.rb +1168 -0
- data/lib/google/cloud/monitoring/v3/service_monitoring_service/credentials.rb +53 -0
- data/lib/google/cloud/monitoring/v3/service_monitoring_service/paths.rb +185 -0
- data/lib/google/cloud/monitoring/v3/uptime_check_service.rb +56 -0
- data/lib/google/cloud/monitoring/v3/uptime_check_service/client.rb +822 -0
- data/lib/google/cloud/monitoring/v3/uptime_check_service/credentials.rb +53 -0
- data/lib/google/cloud/monitoring/v3/uptime_check_service/paths.rb +127 -0
- data/lib/google/cloud/monitoring/v3/version.rb +28 -0
- data/lib/google/monitoring/v3/alert_pb.rb +84 -0
- data/lib/google/monitoring/v3/alert_service_pb.rb +56 -0
- data/lib/google/monitoring/v3/alert_service_services_pb.rb +64 -0
- data/lib/google/monitoring/v3/common_pb.rb +98 -0
- data/lib/google/monitoring/v3/dropped_labels_pb.rb +22 -0
- data/lib/google/monitoring/v3/group_pb.rb +27 -0
- data/lib/google/monitoring/v3/group_service_pb.rb +76 -0
- data/lib/google/monitoring/v3/group_service_services_pb.rb +67 -0
- data/lib/google/monitoring/v3/metric_pb.rb +85 -0
- data/lib/google/monitoring/v3/metric_service_pb.rb +133 -0
- data/lib/google/monitoring/v3/metric_service_services_pb.rb +67 -0
- data/lib/google/monitoring/v3/mutation_record_pb.rb +24 -0
- data/lib/google/monitoring/v3/notification_pb.rb +50 -0
- data/lib/google/monitoring/v3/notification_service_pb.rb +93 -0
- data/lib/google/monitoring/v3/notification_service_services_pb.rb +95 -0
- data/lib/google/monitoring/v3/service_pb.rb +152 -0
- data/lib/google/monitoring/v3/service_service_pb.rb +89 -0
- data/lib/google/monitoring/v3/service_service_services_pb.rb +66 -0
- data/lib/google/monitoring/v3/span_context_pb.rb +22 -0
- data/lib/google/monitoring/v3/uptime_pb.rb +126 -0
- data/lib/google/monitoring/v3/uptime_service_pb.rb +66 -0
- data/lib/google/monitoring/v3/uptime_service_services_pb.rb +68 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/distribution.rb +225 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/label.rb +49 -0
- data/proto_docs/google/api/launch_stage.rb +65 -0
- data/proto_docs/google/api/metric.rb +203 -0
- data/proto_docs/google/api/monitored_resource.rb +137 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/monitoring/v3/alert.rb +359 -0
- data/proto_docs/google/monitoring/v3/alert_service.rb +162 -0
- data/proto_docs/google/monitoring/v3/common.rb +464 -0
- data/proto_docs/google/monitoring/v3/dropped_labels.rb +58 -0
- data/proto_docs/google/monitoring/v3/group.rb +84 -0
- data/proto_docs/google/monitoring/v3/group_service.rb +197 -0
- data/proto_docs/google/monitoring/v3/metric.rb +249 -0
- data/proto_docs/google/monitoring/v3/metric_service.rb +366 -0
- data/proto_docs/google/monitoring/v3/mutation_record.rb +38 -0
- data/proto_docs/google/monitoring/v3/notification.rb +186 -0
- data/proto_docs/google/monitoring/v3/notification_service.rb +266 -0
- data/proto_docs/google/monitoring/v3/service.rb +424 -0
- data/proto_docs/google/monitoring/v3/service_service.rb +239 -0
- data/proto_docs/google/monitoring/v3/span_context.rb +49 -0
- data/proto_docs/google/monitoring/v3/uptime.rb +403 -0
- data/proto_docs/google/monitoring/v3/uptime_service.rb +166 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/type/calendar_period.rb +55 -0
- metadata +269 -0
@@ -0,0 +1,162 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Monitoring
|
23
|
+
module V3
|
24
|
+
# The protocol for the `CreateAlertPolicy` request.
|
25
|
+
# @!attribute [rw] name
|
26
|
+
# @return [::String]
|
27
|
+
# Required. The project in which to create the alerting policy. The format is:
|
28
|
+
#
|
29
|
+
# projects/[PROJECT_ID_OR_NUMBER]
|
30
|
+
#
|
31
|
+
# Note that this field names the parent container in which the alerting
|
32
|
+
# policy will be written, not the name of the created policy. The alerting
|
33
|
+
# policy that is returned will have a name that contains a normalized
|
34
|
+
# representation of this name as a prefix but adds a suffix of the form
|
35
|
+
# `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the
|
36
|
+
# container.
|
37
|
+
# @!attribute [rw] alert_policy
|
38
|
+
# @return [::Google::Cloud::Monitoring::V3::AlertPolicy]
|
39
|
+
# Required. The requested alerting policy. You should omit the `name` field in this
|
40
|
+
# policy. The name will be returned in the new policy, including
|
41
|
+
# a new `[ALERT_POLICY_ID]` value.
|
42
|
+
class CreateAlertPolicyRequest
|
43
|
+
include ::Google::Protobuf::MessageExts
|
44
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
45
|
+
end
|
46
|
+
|
47
|
+
# The protocol for the `GetAlertPolicy` request.
|
48
|
+
# @!attribute [rw] name
|
49
|
+
# @return [::String]
|
50
|
+
# Required. The alerting policy to retrieve. The format is:
|
51
|
+
#
|
52
|
+
# projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
|
53
|
+
class GetAlertPolicyRequest
|
54
|
+
include ::Google::Protobuf::MessageExts
|
55
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
56
|
+
end
|
57
|
+
|
58
|
+
# The protocol for the `ListAlertPolicies` request.
|
59
|
+
# @!attribute [rw] name
|
60
|
+
# @return [::String]
|
61
|
+
# Required. The project whose alert policies are to be listed. The format is:
|
62
|
+
#
|
63
|
+
# projects/[PROJECT_ID_OR_NUMBER]
|
64
|
+
#
|
65
|
+
# Note that this field names the parent container in which the alerting
|
66
|
+
# policies to be listed are stored. To retrieve a single alerting policy
|
67
|
+
# by name, use the
|
68
|
+
# {::Google::Cloud::Monitoring::V3::AlertPolicyService::Client#get_alert_policy GetAlertPolicy}
|
69
|
+
# operation, instead.
|
70
|
+
# @!attribute [rw] filter
|
71
|
+
# @return [::String]
|
72
|
+
# If provided, this field specifies the criteria that must be met by
|
73
|
+
# alert policies to be included in the response.
|
74
|
+
#
|
75
|
+
# For more details, see [sorting and
|
76
|
+
# filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).
|
77
|
+
# @!attribute [rw] order_by
|
78
|
+
# @return [::String]
|
79
|
+
# A comma-separated list of fields by which to sort the result. Supports
|
80
|
+
# the same set of field references as the `filter` field. Entries can be
|
81
|
+
# prefixed with a minus sign to sort by the field in descending order.
|
82
|
+
#
|
83
|
+
# For more details, see [sorting and
|
84
|
+
# filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).
|
85
|
+
# @!attribute [rw] page_size
|
86
|
+
# @return [::Integer]
|
87
|
+
# The maximum number of results to return in a single response.
|
88
|
+
# @!attribute [rw] page_token
|
89
|
+
# @return [::String]
|
90
|
+
# If this field is not empty then it must contain the `nextPageToken` value
|
91
|
+
# returned by a previous call to this method. Using this field causes the
|
92
|
+
# method to return more results from the previous method call.
|
93
|
+
class ListAlertPoliciesRequest
|
94
|
+
include ::Google::Protobuf::MessageExts
|
95
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
96
|
+
end
|
97
|
+
|
98
|
+
# The protocol for the `ListAlertPolicies` response.
|
99
|
+
# @!attribute [rw] alert_policies
|
100
|
+
# @return [::Array<::Google::Cloud::Monitoring::V3::AlertPolicy>]
|
101
|
+
# The returned alert policies.
|
102
|
+
# @!attribute [rw] next_page_token
|
103
|
+
# @return [::String]
|
104
|
+
# If there might be more results than were returned, then this field is set
|
105
|
+
# to a non-empty value. To see the additional results,
|
106
|
+
# use that value as `page_token` in the next call to this method.
|
107
|
+
class ListAlertPoliciesResponse
|
108
|
+
include ::Google::Protobuf::MessageExts
|
109
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
110
|
+
end
|
111
|
+
|
112
|
+
# The protocol for the `UpdateAlertPolicy` request.
|
113
|
+
# @!attribute [rw] update_mask
|
114
|
+
# @return [::Google::Protobuf::FieldMask]
|
115
|
+
# Optional. A list of alerting policy field names. If this field is not
|
116
|
+
# empty, each listed field in the existing alerting policy is set to the
|
117
|
+
# value of the corresponding field in the supplied policy (`alert_policy`),
|
118
|
+
# or to the field's default value if the field is not in the supplied
|
119
|
+
# alerting policy. Fields not listed retain their previous value.
|
120
|
+
#
|
121
|
+
# Examples of valid field masks include `display_name`, `documentation`,
|
122
|
+
# `documentation.content`, `documentation.mime_type`, `user_labels`,
|
123
|
+
# `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc.
|
124
|
+
#
|
125
|
+
# If this field is empty, then the supplied alerting policy replaces the
|
126
|
+
# existing policy. It is the same as deleting the existing policy and
|
127
|
+
# adding the supplied policy, except for the following:
|
128
|
+
#
|
129
|
+
# + The new policy will have the same `[ALERT_POLICY_ID]` as the former
|
130
|
+
# policy. This gives you continuity with the former policy in your
|
131
|
+
# notifications and incidents.
|
132
|
+
# + Conditions in the new policy will keep their former `[CONDITION_ID]` if
|
133
|
+
# the supplied condition includes the `name` field with that
|
134
|
+
# `[CONDITION_ID]`. If the supplied condition omits the `name` field,
|
135
|
+
# then a new `[CONDITION_ID]` is created.
|
136
|
+
# @!attribute [rw] alert_policy
|
137
|
+
# @return [::Google::Cloud::Monitoring::V3::AlertPolicy]
|
138
|
+
# Required. The updated alerting policy or the updated values for the
|
139
|
+
# fields listed in `update_mask`.
|
140
|
+
# If `update_mask` is not empty, any fields in this policy that are
|
141
|
+
# not in `update_mask` are ignored.
|
142
|
+
class UpdateAlertPolicyRequest
|
143
|
+
include ::Google::Protobuf::MessageExts
|
144
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
145
|
+
end
|
146
|
+
|
147
|
+
# The protocol for the `DeleteAlertPolicy` request.
|
148
|
+
# @!attribute [rw] name
|
149
|
+
# @return [::String]
|
150
|
+
# Required. The alerting policy to delete. The format is:
|
151
|
+
#
|
152
|
+
# projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
|
153
|
+
#
|
154
|
+
# For more information, see {::Google::Cloud::Monitoring::V3::AlertPolicy AlertPolicy}.
|
155
|
+
class DeleteAlertPolicyRequest
|
156
|
+
include ::Google::Protobuf::MessageExts
|
157
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
@@ -0,0 +1,464 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Monitoring
|
23
|
+
module V3
|
24
|
+
# A single strongly-typed value.
|
25
|
+
# @!attribute [rw] bool_value
|
26
|
+
# @return [::Boolean]
|
27
|
+
# A Boolean value: `true` or `false`.
|
28
|
+
# @!attribute [rw] int64_value
|
29
|
+
# @return [::Integer]
|
30
|
+
# A 64-bit integer. Its range is approximately ±9.2x10<sup>18</sup>.
|
31
|
+
# @!attribute [rw] double_value
|
32
|
+
# @return [::Float]
|
33
|
+
# A 64-bit double-precision floating-point number. Its magnitude
|
34
|
+
# is approximately ±10<sup>±300</sup> and it has 16
|
35
|
+
# significant digits of precision.
|
36
|
+
# @!attribute [rw] string_value
|
37
|
+
# @return [::String]
|
38
|
+
# A variable-length string value.
|
39
|
+
# @!attribute [rw] distribution_value
|
40
|
+
# @return [::Google::Api::Distribution]
|
41
|
+
# A distribution value.
|
42
|
+
class TypedValue
|
43
|
+
include ::Google::Protobuf::MessageExts
|
44
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
45
|
+
end
|
46
|
+
|
47
|
+
# A closed time interval. It extends from the start time to the end time, and includes both: `[startTime, endTime]`. Valid time intervals depend on the [`MetricKind`](/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) of the metric value. In no case can the end time be earlier than the start time.
|
48
|
+
#
|
49
|
+
# * For a `GAUGE` metric, the `startTime` value is technically optional; if
|
50
|
+
# no value is specified, the start time defaults to the value of the
|
51
|
+
# end time, and the interval represents a single point in time. If both
|
52
|
+
# start and end times are specified, they must be identical. Such an
|
53
|
+
# interval is valid only for `GAUGE` metrics, which are point-in-time
|
54
|
+
# measurements.
|
55
|
+
#
|
56
|
+
# * For `DELTA` and `CUMULATIVE` metrics, the start time must be earlier
|
57
|
+
# than the end time.
|
58
|
+
#
|
59
|
+
# * In all cases, the start time of the next interval must be
|
60
|
+
# at least a millisecond after the end time of the previous interval.
|
61
|
+
# Because the interval is closed, if the start time of a new interval
|
62
|
+
# is the same as the end time of the previous interval, data written
|
63
|
+
# at the new start time could overwrite data written at the previous
|
64
|
+
# end time.
|
65
|
+
# @!attribute [rw] end_time
|
66
|
+
# @return [::Google::Protobuf::Timestamp]
|
67
|
+
# Required. The end of the time interval.
|
68
|
+
# @!attribute [rw] start_time
|
69
|
+
# @return [::Google::Protobuf::Timestamp]
|
70
|
+
# Optional. The beginning of the time interval. The default value
|
71
|
+
# for the start time is the end time. The start time must not be
|
72
|
+
# later than the end time.
|
73
|
+
class TimeInterval
|
74
|
+
include ::Google::Protobuf::MessageExts
|
75
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
76
|
+
end
|
77
|
+
|
78
|
+
# Describes how to combine multiple time series to provide a different view of
|
79
|
+
# the data. Aggregation of time series is done in two steps. First, each time
|
80
|
+
# series in the set is _aligned_ to the same time interval boundaries, then the
|
81
|
+
# set of time series is optionally _reduced_ in number.
|
82
|
+
#
|
83
|
+
# Alignment consists of applying the `per_series_aligner` operation
|
84
|
+
# to each time series after its data has been divided into regular
|
85
|
+
# `alignment_period` time intervals. This process takes _all_ of the data
|
86
|
+
# points in an alignment period, applies a mathematical transformation such as
|
87
|
+
# averaging, minimum, maximum, delta, etc., and converts them into a single
|
88
|
+
# data point per period.
|
89
|
+
#
|
90
|
+
# Reduction is when the aligned and transformed time series can optionally be
|
91
|
+
# combined, reducing the number of time series through similar mathematical
|
92
|
+
# transformations. Reduction involves applying a `cross_series_reducer` to
|
93
|
+
# all the time series, optionally sorting the time series into subsets with
|
94
|
+
# `group_by_fields`, and applying the reducer to each subset.
|
95
|
+
#
|
96
|
+
# The raw time series data can contain a huge amount of information from
|
97
|
+
# multiple sources. Alignment and reduction transforms this mass of data into
|
98
|
+
# a more manageable and representative collection of data, for example "the
|
99
|
+
# 95% latency across the average of all tasks in a cluster". This
|
100
|
+
# representative data can be more easily graphed and comprehended, and the
|
101
|
+
# individual time series data is still available for later drilldown. For more
|
102
|
+
# details, see [Filtering and
|
103
|
+
# aggregation](https://cloud.google.com/monitoring/api/v3/aggregation).
|
104
|
+
# @!attribute [rw] alignment_period
|
105
|
+
# @return [::Google::Protobuf::Duration]
|
106
|
+
# The `alignment_period` specifies a time interval, in seconds, that is used
|
107
|
+
# to divide the data in all the
|
108
|
+
# {::Google::Cloud::Monitoring::V3::TimeSeries time series} into consistent blocks of
|
109
|
+
# time. This will be done before the per-series aligner can be applied to
|
110
|
+
# the data.
|
111
|
+
#
|
112
|
+
# The value must be at least 60 seconds. If a per-series aligner other than
|
113
|
+
# `ALIGN_NONE` is specified, this field is required or an error is returned.
|
114
|
+
# If no per-series aligner is specified, or the aligner `ALIGN_NONE` is
|
115
|
+
# specified, then this field is ignored.
|
116
|
+
# @!attribute [rw] per_series_aligner
|
117
|
+
# @return [::Google::Cloud::Monitoring::V3::Aggregation::Aligner]
|
118
|
+
# An `Aligner` describes how to bring the data points in a single
|
119
|
+
# time series into temporal alignment. Except for `ALIGN_NONE`, all
|
120
|
+
# alignments cause all the data points in an `alignment_period` to be
|
121
|
+
# mathematically grouped together, resulting in a single data point for
|
122
|
+
# each `alignment_period` with end timestamp at the end of the period.
|
123
|
+
#
|
124
|
+
# Not all alignment operations may be applied to all time series. The valid
|
125
|
+
# choices depend on the `metric_kind` and `value_type` of the original time
|
126
|
+
# series. Alignment can change the `metric_kind` or the `value_type` of
|
127
|
+
# the time series.
|
128
|
+
#
|
129
|
+
# Time series data must be aligned in order to perform cross-time
|
130
|
+
# series reduction. If `cross_series_reducer` is specified, then
|
131
|
+
# `per_series_aligner` must be specified and not equal to `ALIGN_NONE`
|
132
|
+
# and `alignment_period` must be specified; otherwise, an error is
|
133
|
+
# returned.
|
134
|
+
# @!attribute [rw] cross_series_reducer
|
135
|
+
# @return [::Google::Cloud::Monitoring::V3::Aggregation::Reducer]
|
136
|
+
# The reduction operation to be used to combine time series into a single
|
137
|
+
# time series, where the value of each data point in the resulting series is
|
138
|
+
# a function of all the already aligned values in the input time series.
|
139
|
+
#
|
140
|
+
# Not all reducer operations can be applied to all time series. The valid
|
141
|
+
# choices depend on the `metric_kind` and the `value_type` of the original
|
142
|
+
# time series. Reduction can yield a time series with a different
|
143
|
+
# `metric_kind` or `value_type` than the input time series.
|
144
|
+
#
|
145
|
+
# Time series data must first be aligned (see `per_series_aligner`) in order
|
146
|
+
# to perform cross-time series reduction. If `cross_series_reducer` is
|
147
|
+
# specified, then `per_series_aligner` must be specified, and must not be
|
148
|
+
# `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an
|
149
|
+
# error is returned.
|
150
|
+
# @!attribute [rw] group_by_fields
|
151
|
+
# @return [::Array<::String>]
|
152
|
+
# The set of fields to preserve when `cross_series_reducer` is
|
153
|
+
# specified. The `group_by_fields` determine how the time series are
|
154
|
+
# partitioned into subsets prior to applying the aggregation
|
155
|
+
# operation. Each subset contains time series that have the same
|
156
|
+
# value for each of the grouping fields. Each individual time
|
157
|
+
# series is a member of exactly one subset. The
|
158
|
+
# `cross_series_reducer` is applied to each subset of time series.
|
159
|
+
# It is not possible to reduce across different resource types, so
|
160
|
+
# this field implicitly contains `resource.type`. Fields not
|
161
|
+
# specified in `group_by_fields` are aggregated away. If
|
162
|
+
# `group_by_fields` is not specified and all the time series have
|
163
|
+
# the same resource type, then the time series are aggregated into
|
164
|
+
# a single output time series. If `cross_series_reducer` is not
|
165
|
+
# defined, this field is ignored.
|
166
|
+
class Aggregation
|
167
|
+
include ::Google::Protobuf::MessageExts
|
168
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
169
|
+
|
170
|
+
# The `Aligner` specifies the operation that will be applied to the data
|
171
|
+
# points in each alignment period in a time series. Except for
|
172
|
+
# `ALIGN_NONE`, which specifies that no operation be applied, each alignment
|
173
|
+
# operation replaces the set of data values in each alignment period with
|
174
|
+
# a single value: the result of applying the operation to the data values.
|
175
|
+
# An aligned time series has a single data value at the end of each
|
176
|
+
# `alignment_period`.
|
177
|
+
#
|
178
|
+
# An alignment operation can change the data type of the values, too. For
|
179
|
+
# example, if you apply a counting operation to boolean values, the data
|
180
|
+
# `value_type` in the original time series is `BOOLEAN`, but the `value_type`
|
181
|
+
# in the aligned result is `INT64`.
|
182
|
+
module Aligner
|
183
|
+
# No alignment. Raw data is returned. Not valid if cross-series reduction
|
184
|
+
# is requested. The `value_type` of the result is the same as the
|
185
|
+
# `value_type` of the input.
|
186
|
+
ALIGN_NONE = 0
|
187
|
+
|
188
|
+
# Align and convert to
|
189
|
+
# {::Google::Api::MetricDescriptor::MetricKind::DELTA DELTA}.
|
190
|
+
# The output is `delta = y1 - y0`.
|
191
|
+
#
|
192
|
+
# This alignment is valid for
|
193
|
+
# {::Google::Api::MetricDescriptor::MetricKind::CUMULATIVE CUMULATIVE} and
|
194
|
+
# `DELTA` metrics. If the selected alignment period results in periods
|
195
|
+
# with no data, then the aligned value for such a period is created by
|
196
|
+
# interpolation. The `value_type` of the aligned result is the same as
|
197
|
+
# the `value_type` of the input.
|
198
|
+
ALIGN_DELTA = 1
|
199
|
+
|
200
|
+
# Align and convert to a rate. The result is computed as
|
201
|
+
# `rate = (y1 - y0)/(t1 - t0)`, or "delta over time".
|
202
|
+
# Think of this aligner as providing the slope of the line that passes
|
203
|
+
# through the value at the start and at the end of the `alignment_period`.
|
204
|
+
#
|
205
|
+
# This aligner is valid for `CUMULATIVE`
|
206
|
+
# and `DELTA` metrics with numeric values. If the selected alignment
|
207
|
+
# period results in periods with no data, then the aligned value for
|
208
|
+
# such a period is created by interpolation. The output is a `GAUGE`
|
209
|
+
# metric with `value_type` `DOUBLE`.
|
210
|
+
#
|
211
|
+
# If, by "rate", you mean "percentage change", see the
|
212
|
+
# `ALIGN_PERCENT_CHANGE` aligner instead.
|
213
|
+
ALIGN_RATE = 2
|
214
|
+
|
215
|
+
# Align by interpolating between adjacent points around the alignment
|
216
|
+
# period boundary. This aligner is valid for `GAUGE` metrics with
|
217
|
+
# numeric values. The `value_type` of the aligned result is the same as the
|
218
|
+
# `value_type` of the input.
|
219
|
+
ALIGN_INTERPOLATE = 3
|
220
|
+
|
221
|
+
# Align by moving the most recent data point before the end of the
|
222
|
+
# alignment period to the boundary at the end of the alignment
|
223
|
+
# period. This aligner is valid for `GAUGE` metrics. The `value_type` of
|
224
|
+
# the aligned result is the same as the `value_type` of the input.
|
225
|
+
ALIGN_NEXT_OLDER = 4
|
226
|
+
|
227
|
+
# Align the time series by returning the minimum value in each alignment
|
228
|
+
# period. This aligner is valid for `GAUGE` and `DELTA` metrics with
|
229
|
+
# numeric values. The `value_type` of the aligned result is the same as
|
230
|
+
# the `value_type` of the input.
|
231
|
+
ALIGN_MIN = 10
|
232
|
+
|
233
|
+
# Align the time series by returning the maximum value in each alignment
|
234
|
+
# period. This aligner is valid for `GAUGE` and `DELTA` metrics with
|
235
|
+
# numeric values. The `value_type` of the aligned result is the same as
|
236
|
+
# the `value_type` of the input.
|
237
|
+
ALIGN_MAX = 11
|
238
|
+
|
239
|
+
# Align the time series by returning the mean value in each alignment
|
240
|
+
# period. This aligner is valid for `GAUGE` and `DELTA` metrics with
|
241
|
+
# numeric values. The `value_type` of the aligned result is `DOUBLE`.
|
242
|
+
ALIGN_MEAN = 12
|
243
|
+
|
244
|
+
# Align the time series by returning the number of values in each alignment
|
245
|
+
# period. This aligner is valid for `GAUGE` and `DELTA` metrics with
|
246
|
+
# numeric or Boolean values. The `value_type` of the aligned result is
|
247
|
+
# `INT64`.
|
248
|
+
ALIGN_COUNT = 13
|
249
|
+
|
250
|
+
# Align the time series by returning the sum of the values in each
|
251
|
+
# alignment period. This aligner is valid for `GAUGE` and `DELTA`
|
252
|
+
# metrics with numeric and distribution values. The `value_type` of the
|
253
|
+
# aligned result is the same as the `value_type` of the input.
|
254
|
+
ALIGN_SUM = 14
|
255
|
+
|
256
|
+
# Align the time series by returning the standard deviation of the values
|
257
|
+
# in each alignment period. This aligner is valid for `GAUGE` and
|
258
|
+
# `DELTA` metrics with numeric values. The `value_type` of the output is
|
259
|
+
# `DOUBLE`.
|
260
|
+
ALIGN_STDDEV = 15
|
261
|
+
|
262
|
+
# Align the time series by returning the number of `True` values in
|
263
|
+
# each alignment period. This aligner is valid for `GAUGE` metrics with
|
264
|
+
# Boolean values. The `value_type` of the output is `INT64`.
|
265
|
+
ALIGN_COUNT_TRUE = 16
|
266
|
+
|
267
|
+
# Align the time series by returning the number of `False` values in
|
268
|
+
# each alignment period. This aligner is valid for `GAUGE` metrics with
|
269
|
+
# Boolean values. The `value_type` of the output is `INT64`.
|
270
|
+
ALIGN_COUNT_FALSE = 24
|
271
|
+
|
272
|
+
# Align the time series by returning the ratio of the number of `True`
|
273
|
+
# values to the total number of values in each alignment period. This
|
274
|
+
# aligner is valid for `GAUGE` metrics with Boolean values. The output
|
275
|
+
# value is in the range [0.0, 1.0] and has `value_type` `DOUBLE`.
|
276
|
+
ALIGN_FRACTION_TRUE = 17
|
277
|
+
|
278
|
+
# Align the time series by using [percentile
|
279
|
+
# aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting
|
280
|
+
# data point in each alignment period is the 99th percentile of all data
|
281
|
+
# points in the period. This aligner is valid for `GAUGE` and `DELTA`
|
282
|
+
# metrics with distribution values. The output is a `GAUGE` metric with
|
283
|
+
# `value_type` `DOUBLE`.
|
284
|
+
ALIGN_PERCENTILE_99 = 18
|
285
|
+
|
286
|
+
# Align the time series by using [percentile
|
287
|
+
# aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting
|
288
|
+
# data point in each alignment period is the 95th percentile of all data
|
289
|
+
# points in the period. This aligner is valid for `GAUGE` and `DELTA`
|
290
|
+
# metrics with distribution values. The output is a `GAUGE` metric with
|
291
|
+
# `value_type` `DOUBLE`.
|
292
|
+
ALIGN_PERCENTILE_95 = 19
|
293
|
+
|
294
|
+
# Align the time series by using [percentile
|
295
|
+
# aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting
|
296
|
+
# data point in each alignment period is the 50th percentile of all data
|
297
|
+
# points in the period. This aligner is valid for `GAUGE` and `DELTA`
|
298
|
+
# metrics with distribution values. The output is a `GAUGE` metric with
|
299
|
+
# `value_type` `DOUBLE`.
|
300
|
+
ALIGN_PERCENTILE_50 = 20
|
301
|
+
|
302
|
+
# Align the time series by using [percentile
|
303
|
+
# aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting
|
304
|
+
# data point in each alignment period is the 5th percentile of all data
|
305
|
+
# points in the period. This aligner is valid for `GAUGE` and `DELTA`
|
306
|
+
# metrics with distribution values. The output is a `GAUGE` metric with
|
307
|
+
# `value_type` `DOUBLE`.
|
308
|
+
ALIGN_PERCENTILE_05 = 21
|
309
|
+
|
310
|
+
# Align and convert to a percentage change. This aligner is valid for
|
311
|
+
# `GAUGE` and `DELTA` metrics with numeric values. This alignment returns
|
312
|
+
# `((current - previous)/previous) * 100`, where the value of `previous` is
|
313
|
+
# determined based on the `alignment_period`.
|
314
|
+
#
|
315
|
+
# If the values of `current` and `previous` are both 0, then the returned
|
316
|
+
# value is 0. If only `previous` is 0, the returned value is infinity.
|
317
|
+
#
|
318
|
+
# A 10-minute moving mean is computed at each point of the alignment period
|
319
|
+
# prior to the above calculation to smooth the metric and prevent false
|
320
|
+
# positives from very short-lived spikes. The moving mean is only
|
321
|
+
# applicable for data whose values are `>= 0`. Any values `< 0` are
|
322
|
+
# treated as a missing datapoint, and are ignored. While `DELTA`
|
323
|
+
# metrics are accepted by this alignment, special care should be taken that
|
324
|
+
# the values for the metric will always be positive. The output is a
|
325
|
+
# `GAUGE` metric with `value_type` `DOUBLE`.
|
326
|
+
ALIGN_PERCENT_CHANGE = 23
|
327
|
+
end
|
328
|
+
|
329
|
+
# A Reducer operation describes how to aggregate data points from multiple
|
330
|
+
# time series into a single time series, where the value of each data point
|
331
|
+
# in the resulting series is a function of all the already aligned values in
|
332
|
+
# the input time series.
|
333
|
+
module Reducer
|
334
|
+
# No cross-time series reduction. The output of the `Aligner` is
|
335
|
+
# returned.
|
336
|
+
REDUCE_NONE = 0
|
337
|
+
|
338
|
+
# Reduce by computing the mean value across time series for each
|
339
|
+
# alignment period. This reducer is valid for
|
340
|
+
# {::Google::Api::MetricDescriptor::MetricKind::DELTA DELTA} and
|
341
|
+
# {::Google::Api::MetricDescriptor::MetricKind::GAUGE GAUGE} metrics with
|
342
|
+
# numeric or distribution values. The `value_type` of the output is
|
343
|
+
# {::Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
|
344
|
+
REDUCE_MEAN = 1
|
345
|
+
|
346
|
+
# Reduce by computing the minimum value across time series for each
|
347
|
+
# alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics
|
348
|
+
# with numeric values. The `value_type` of the output is the same as the
|
349
|
+
# `value_type` of the input.
|
350
|
+
REDUCE_MIN = 2
|
351
|
+
|
352
|
+
# Reduce by computing the maximum value across time series for each
|
353
|
+
# alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics
|
354
|
+
# with numeric values. The `value_type` of the output is the same as the
|
355
|
+
# `value_type` of the input.
|
356
|
+
REDUCE_MAX = 3
|
357
|
+
|
358
|
+
# Reduce by computing the sum across time series for each
|
359
|
+
# alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics
|
360
|
+
# with numeric and distribution values. The `value_type` of the output is
|
361
|
+
# the same as the `value_type` of the input.
|
362
|
+
REDUCE_SUM = 4
|
363
|
+
|
364
|
+
# Reduce by computing the standard deviation across time series
|
365
|
+
# for each alignment period. This reducer is valid for `DELTA` and
|
366
|
+
# `GAUGE` metrics with numeric or distribution values. The `value_type`
|
367
|
+
# of the output is `DOUBLE`.
|
368
|
+
REDUCE_STDDEV = 5
|
369
|
+
|
370
|
+
# Reduce by computing the number of data points across time series
|
371
|
+
# for each alignment period. This reducer is valid for `DELTA` and
|
372
|
+
# `GAUGE` metrics of numeric, Boolean, distribution, and string
|
373
|
+
# `value_type`. The `value_type` of the output is `INT64`.
|
374
|
+
REDUCE_COUNT = 6
|
375
|
+
|
376
|
+
# Reduce by computing the number of `True`-valued data points across time
|
377
|
+
# series for each alignment period. This reducer is valid for `DELTA` and
|
378
|
+
# `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output
|
379
|
+
# is `INT64`.
|
380
|
+
REDUCE_COUNT_TRUE = 7
|
381
|
+
|
382
|
+
# Reduce by computing the number of `False`-valued data points across time
|
383
|
+
# series for each alignment period. This reducer is valid for `DELTA` and
|
384
|
+
# `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output
|
385
|
+
# is `INT64`.
|
386
|
+
REDUCE_COUNT_FALSE = 15
|
387
|
+
|
388
|
+
# Reduce by computing the ratio of the number of `True`-valued data points
|
389
|
+
# to the total number of data points for each alignment period. This
|
390
|
+
# reducer is valid for `DELTA` and `GAUGE` metrics of Boolean `value_type`.
|
391
|
+
# The output value is in the range [0.0, 1.0] and has `value_type`
|
392
|
+
# `DOUBLE`.
|
393
|
+
REDUCE_FRACTION_TRUE = 8
|
394
|
+
|
395
|
+
# Reduce by computing the [99th
|
396
|
+
# percentile](https://en.wikipedia.org/wiki/Percentile) of data points
|
397
|
+
# across time series for each alignment period. This reducer is valid for
|
398
|
+
# `GAUGE` and `DELTA` metrics of numeric and distribution type. The value
|
399
|
+
# of the output is `DOUBLE`.
|
400
|
+
REDUCE_PERCENTILE_99 = 9
|
401
|
+
|
402
|
+
# Reduce by computing the [95th
|
403
|
+
# percentile](https://en.wikipedia.org/wiki/Percentile) of data points
|
404
|
+
# across time series for each alignment period. This reducer is valid for
|
405
|
+
# `GAUGE` and `DELTA` metrics of numeric and distribution type. The value
|
406
|
+
# of the output is `DOUBLE`.
|
407
|
+
REDUCE_PERCENTILE_95 = 10
|
408
|
+
|
409
|
+
# Reduce by computing the [50th
|
410
|
+
# percentile](https://en.wikipedia.org/wiki/Percentile) of data points
|
411
|
+
# across time series for each alignment period. This reducer is valid for
|
412
|
+
# `GAUGE` and `DELTA` metrics of numeric and distribution type. The value
|
413
|
+
# of the output is `DOUBLE`.
|
414
|
+
REDUCE_PERCENTILE_50 = 11
|
415
|
+
|
416
|
+
# Reduce by computing the [5th
|
417
|
+
# percentile](https://en.wikipedia.org/wiki/Percentile) of data points
|
418
|
+
# across time series for each alignment period. This reducer is valid for
|
419
|
+
# `GAUGE` and `DELTA` metrics of numeric and distribution type. The value
|
420
|
+
# of the output is `DOUBLE`.
|
421
|
+
REDUCE_PERCENTILE_05 = 12
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
# Specifies an ordering relationship on two arguments, called `left` and
|
426
|
+
# `right`.
|
427
|
+
module ComparisonType
|
428
|
+
# No ordering relationship is specified.
|
429
|
+
COMPARISON_UNSPECIFIED = 0
|
430
|
+
|
431
|
+
# True if the left argument is greater than the right argument.
|
432
|
+
COMPARISON_GT = 1
|
433
|
+
|
434
|
+
# True if the left argument is greater than or equal to the right argument.
|
435
|
+
COMPARISON_GE = 2
|
436
|
+
|
437
|
+
# True if the left argument is less than the right argument.
|
438
|
+
COMPARISON_LT = 3
|
439
|
+
|
440
|
+
# True if the left argument is less than or equal to the right argument.
|
441
|
+
COMPARISON_LE = 4
|
442
|
+
|
443
|
+
# True if the left argument is equal to the right argument.
|
444
|
+
COMPARISON_EQ = 5
|
445
|
+
|
446
|
+
# True if the left argument is not equal to the right argument.
|
447
|
+
COMPARISON_NE = 6
|
448
|
+
end
|
449
|
+
|
450
|
+
# Obsolete.
|
451
|
+
module ServiceTier
|
452
|
+
# Obsolete.
|
453
|
+
SERVICE_TIER_UNSPECIFIED = 0
|
454
|
+
|
455
|
+
# Obsolete.
|
456
|
+
SERVICE_TIER_BASIC = 1
|
457
|
+
|
458
|
+
# Obsolete.
|
459
|
+
SERVICE_TIER_PREMIUM = 2
|
460
|
+
end
|
461
|
+
end
|
462
|
+
end
|
463
|
+
end
|
464
|
+
end
|