google-cloud-monitoring 0.27.0 → 0.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -5
- data/lib/google/cloud/monitoring.rb +164 -6
- data/lib/google/cloud/monitoring/credentials.rb +1 -1
- data/lib/google/cloud/monitoring/v3.rb +167 -26
- data/lib/google/cloud/monitoring/v3/alert_policy_service_client.rb +486 -0
- data/lib/google/cloud/monitoring/v3/alert_policy_service_client_config.json +51 -0
- data/lib/google/cloud/monitoring/v3/doc/google/api/distribution.rb +1 -1
- data/lib/google/cloud/monitoring/v3/doc/google/api/label.rb +1 -1
- data/lib/google/cloud/monitoring/v3/doc/google/api/metric.rb +1 -1
- data/lib/google/cloud/monitoring/v3/doc/google/api/monitored_resource.rb +1 -1
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/alert.rb +326 -0
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/common.rb +91 -3
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/group.rb +1 -1
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/metric.rb +1 -1
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/mutation_record.rb +28 -0
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/notification.rb +152 -0
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/uptime.rb +223 -0
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/duration.rb +1 -1
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/field_mask.rb +223 -0
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/timestamp.rb +1 -1
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/wrappers.rb +89 -0
- data/lib/google/cloud/monitoring/v3/doc/overview.rb +8 -7
- data/lib/google/cloud/monitoring/v3/group_service_client.rb +13 -21
- data/lib/google/cloud/monitoring/v3/metric_service_client.rb +19 -21
- data/lib/google/cloud/monitoring/v3/notification_channel_service_client.rb +557 -0
- data/lib/google/cloud/monitoring/v3/notification_channel_service_client_config.json +61 -0
- data/lib/google/cloud/monitoring/v3/uptime_check_service_client.rb +476 -0
- data/lib/google/cloud/monitoring/v3/uptime_check_service_client_config.json +56 -0
- data/lib/google/monitoring/v3/alert_pb.rb +78 -0
- data/lib/google/monitoring/v3/alert_service_pb.rb +49 -0
- data/lib/google/monitoring/v3/alert_service_services_pb.rb +62 -0
- data/lib/google/monitoring/v3/common_pb.rb +20 -0
- data/lib/google/monitoring/v3/group_service_services_pb.rb +1 -1
- data/lib/google/monitoring/v3/metric_service_services_pb.rb +1 -1
- data/lib/google/monitoring/v3/mutation_record_pb.rb +20 -0
- data/lib/google/monitoring/v3/notification_pb.rb +44 -0
- data/lib/google/monitoring/v3/notification_service_pb.rb +85 -0
- data/lib/google/monitoring/v3/notification_service_services_pb.rb +93 -0
- data/lib/google/monitoring/v3/uptime_pb.rb +89 -0
- data/lib/google/monitoring/v3/uptime_service_pb.rb +57 -0
- data/lib/google/monitoring/v3/uptime_service_services_pb.rb +66 -0
- metadata +31 -9
@@ -0,0 +1,51 @@
|
|
1
|
+
{
|
2
|
+
"interfaces": {
|
3
|
+
"google.monitoring.v3.AlertPolicyService": {
|
4
|
+
"retry_codes": {
|
5
|
+
"idempotent": [
|
6
|
+
"DEADLINE_EXCEEDED",
|
7
|
+
"UNAVAILABLE"
|
8
|
+
],
|
9
|
+
"non_idempotent": []
|
10
|
+
},
|
11
|
+
"retry_params": {
|
12
|
+
"default": {
|
13
|
+
"initial_retry_delay_millis": 100,
|
14
|
+
"retry_delay_multiplier": 1.3,
|
15
|
+
"max_retry_delay_millis": 60000,
|
16
|
+
"initial_rpc_timeout_millis": 20000,
|
17
|
+
"rpc_timeout_multiplier": 1.0,
|
18
|
+
"max_rpc_timeout_millis": 20000,
|
19
|
+
"total_timeout_millis": 600000
|
20
|
+
}
|
21
|
+
},
|
22
|
+
"methods": {
|
23
|
+
"ListAlertPolicies": {
|
24
|
+
"timeout_millis": 60000,
|
25
|
+
"retry_codes_name": "idempotent",
|
26
|
+
"retry_params_name": "default"
|
27
|
+
},
|
28
|
+
"GetAlertPolicy": {
|
29
|
+
"timeout_millis": 60000,
|
30
|
+
"retry_codes_name": "idempotent",
|
31
|
+
"retry_params_name": "default"
|
32
|
+
},
|
33
|
+
"CreateAlertPolicy": {
|
34
|
+
"timeout_millis": 60000,
|
35
|
+
"retry_codes_name": "non_idempotent",
|
36
|
+
"retry_params_name": "default"
|
37
|
+
},
|
38
|
+
"DeleteAlertPolicy": {
|
39
|
+
"timeout_millis": 60000,
|
40
|
+
"retry_codes_name": "idempotent",
|
41
|
+
"retry_params_name": "default"
|
42
|
+
},
|
43
|
+
"UpdateAlertPolicy": {
|
44
|
+
"timeout_millis": 60000,
|
45
|
+
"retry_codes_name": "non_idempotent",
|
46
|
+
"retry_params_name": "default"
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
@@ -0,0 +1,326 @@
|
|
1
|
+
# Copyright 2018 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module Google
|
16
|
+
module Monitoring
|
17
|
+
module V3
|
18
|
+
# A description of the conditions under which some aspect of your system is
|
19
|
+
# considered to be "unhealthy" and the ways to notify people or services about
|
20
|
+
# this state. For an overview of alert policies, see
|
21
|
+
# [Introduction to Alerting](https://cloud.google.com/monitoring/alerts/).
|
22
|
+
# @!attribute [rw] name
|
23
|
+
# @return [String]
|
24
|
+
# Required if the policy exists. The resource name for this policy. The
|
25
|
+
# syntax is:
|
26
|
+
#
|
27
|
+
# projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]
|
28
|
+
#
|
29
|
+
# +[ALERT_POLICY_ID]+ is assigned by Stackdriver Monitoring when the policy
|
30
|
+
# is created. When calling the
|
31
|
+
# {Google::Monitoring::V3::AlertPolicyService::CreateAlertPolicy alertPolicies::create}
|
32
|
+
# method, do not include the +name+ field in the alerting policy passed as
|
33
|
+
# part of the request.
|
34
|
+
# @!attribute [rw] display_name
|
35
|
+
# @return [String]
|
36
|
+
# A short name or phrase used to identify the policy in dashboards,
|
37
|
+
# notifications, and incidents. To avoid confusion, don't use the same
|
38
|
+
# display name for multiple policies in the same project. The name is
|
39
|
+
# limited to 512 Unicode characters.
|
40
|
+
# @!attribute [rw] documentation
|
41
|
+
# @return [Google::Monitoring::V3::AlertPolicy::Documentation]
|
42
|
+
# Documentation that is included with notifications and incidents related to
|
43
|
+
# this policy. Best practice is for the documentation to include information
|
44
|
+
# to help responders understand, mitigate, escalate, and correct the
|
45
|
+
# underlying problems detected by the alerting policy. Notification channels
|
46
|
+
# that have limited capacity might not show this documentation.
|
47
|
+
# @!attribute [rw] user_labels
|
48
|
+
# @return [Hash{String => String}]
|
49
|
+
# User-supplied key/value data to be used for organizing and
|
50
|
+
# identifying the +AlertPolicy+ objects.
|
51
|
+
#
|
52
|
+
# The field can contain up to 64 entries. Each key and value is limited to
|
53
|
+
# 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
|
54
|
+
# values can contain only lowercase letters, numerals, underscores, and
|
55
|
+
# dashes. Keys must begin with a letter.
|
56
|
+
# @!attribute [rw] conditions
|
57
|
+
# @return [Array<Google::Monitoring::V3::AlertPolicy::Condition>]
|
58
|
+
# A list of conditions for the policy. The conditions are combined by AND or
|
59
|
+
# OR according to the +combiner+ field. If the combined conditions evaluate
|
60
|
+
# to true, then an incident is created. A policy can have from one to six
|
61
|
+
# conditions.
|
62
|
+
# @!attribute [rw] combiner
|
63
|
+
# @return [Google::Monitoring::V3::AlertPolicy::ConditionCombinerType]
|
64
|
+
# How to combine the results of multiple conditions
|
65
|
+
# to determine if an incident should be opened.
|
66
|
+
# @!attribute [rw] enabled
|
67
|
+
# @return [Google::Protobuf::BoolValue]
|
68
|
+
# Whether or not the policy is enabled. On write, the default interpretation
|
69
|
+
# if unset is that the policy is enabled. On read, clients should not make
|
70
|
+
# any assumption about the state if it has not been populated. The
|
71
|
+
# field should always be populated on List and Get operations, unless
|
72
|
+
# a field projection has been specified that strips it out.
|
73
|
+
# @!attribute [rw] notification_channels
|
74
|
+
# @return [Array<String>]
|
75
|
+
# Identifies the notification channels to which notifications should be sent
|
76
|
+
# when incidents are opened or closed or when new violations occur on
|
77
|
+
# an already opened incident. Each element of this array corresponds to
|
78
|
+
# the +name+ field in each of the
|
79
|
+
# {Google::Monitoring::V3::NotificationChannel +NotificationChannel+}
|
80
|
+
# objects that are returned from the [+ListNotificationChannels+]
|
81
|
+
# [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
|
82
|
+
# method. The syntax of the entries in this field is:
|
83
|
+
#
|
84
|
+
# projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]
|
85
|
+
# @!attribute [rw] creation_record
|
86
|
+
# @return [Google::Monitoring::V3::MutationRecord]
|
87
|
+
# A read-only record of the creation of the alerting policy. If provided
|
88
|
+
# in a call to create or update, this field will be ignored.
|
89
|
+
# @!attribute [rw] mutation_record
|
90
|
+
# @return [Google::Monitoring::V3::MutationRecord]
|
91
|
+
# A read-only record of the most recent change to the alerting policy. If
|
92
|
+
# provided in a call to create or update, this field will be ignored.
|
93
|
+
class AlertPolicy
|
94
|
+
# A content string and a MIME type that describes the content string's
|
95
|
+
# format.
|
96
|
+
# @!attribute [rw] content
|
97
|
+
# @return [String]
|
98
|
+
# The text of the documentation, interpreted according to +mime_type+.
|
99
|
+
# The content may not exceed 8,192 Unicode characters and may not exceed
|
100
|
+
# more than 10,240 bytes when encoded in UTF-8 format, whichever is
|
101
|
+
# smaller.
|
102
|
+
# @!attribute [rw] mime_type
|
103
|
+
# @return [String]
|
104
|
+
# The format of the +content+ field. Presently, only the value
|
105
|
+
# +"text/markdown"+ is supported. See
|
106
|
+
# [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
|
107
|
+
class Documentation; end
|
108
|
+
|
109
|
+
# A condition is a true/false test that determines when an alerting policy
|
110
|
+
# should open an incident. If a condition evaluates to true, it signifies
|
111
|
+
# that something is wrong.
|
112
|
+
# @!attribute [rw] name
|
113
|
+
# @return [String]
|
114
|
+
# Required if the condition exists. The unique resource name for this
|
115
|
+
# condition. Its syntax is:
|
116
|
+
#
|
117
|
+
# projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
|
118
|
+
#
|
119
|
+
# +[CONDITION_ID]+ is assigned by Stackdriver Monitoring when the
|
120
|
+
# condition is created as part of a new or updated alerting policy.
|
121
|
+
#
|
122
|
+
# When calling the
|
123
|
+
# {Google::Monitoring::V3::AlertPolicyService::CreateAlertPolicy alertPolicies::create}
|
124
|
+
# method, do not include the +name+ field in the conditions of the
|
125
|
+
# requested alerting policy. Stackdriver Monitoring creates the
|
126
|
+
# condition identifiers and includes them in the new policy.
|
127
|
+
#
|
128
|
+
# When calling the
|
129
|
+
# {Google::Monitoring::V3::AlertPolicyService::UpdateAlertPolicy alertPolicies::update}
|
130
|
+
# method to update a policy, including a condition +name+ causes the
|
131
|
+
# existing condition to be updated. Conditions without names are added to
|
132
|
+
# the updated policy. Existing conditions are deleted if they are not
|
133
|
+
# updated.
|
134
|
+
#
|
135
|
+
# Best practice is to preserve +[CONDITION_ID]+ if you make only small
|
136
|
+
# changes, such as those to condition thresholds, durations, or trigger
|
137
|
+
# values. Otherwise, treat the change as a new condition and let the
|
138
|
+
# existing condition be deleted.
|
139
|
+
# @!attribute [rw] display_name
|
140
|
+
# @return [String]
|
141
|
+
# A short name or phrase used to identify the condition in dashboards,
|
142
|
+
# notifications, and incidents. To avoid confusion, don't use the same
|
143
|
+
# display name for multiple conditions in the same policy.
|
144
|
+
# @!attribute [rw] condition_threshold
|
145
|
+
# @return [Google::Monitoring::V3::AlertPolicy::Condition::MetricThreshold]
|
146
|
+
# A condition that compares a time series against a threshold.
|
147
|
+
# @!attribute [rw] condition_absent
|
148
|
+
# @return [Google::Monitoring::V3::AlertPolicy::Condition::MetricAbsence]
|
149
|
+
# A condition that checks that a time series continues to
|
150
|
+
# receive new data points.
|
151
|
+
class Condition
|
152
|
+
# Specifies how many time series must fail a predicate to trigger a
|
153
|
+
# condition. If not specified, then a +{count: 1}+ trigger is used.
|
154
|
+
# @!attribute [rw] count
|
155
|
+
# @return [Integer]
|
156
|
+
# The absolute number of time series that must fail
|
157
|
+
# the predicate for the condition to be triggered.
|
158
|
+
# @!attribute [rw] percent
|
159
|
+
# @return [Float]
|
160
|
+
# The percentage of time series that must fail the
|
161
|
+
# predicate for the condition to be triggered.
|
162
|
+
class Trigger; end
|
163
|
+
|
164
|
+
# A condition type that compares a collection of time series
|
165
|
+
# against a threshold.
|
166
|
+
# @!attribute [rw] filter
|
167
|
+
# @return [String]
|
168
|
+
# A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
|
169
|
+
# identifies which time series should be compared with the threshold.
|
170
|
+
#
|
171
|
+
# The filter is similar to the one that is specified in the
|
172
|
+
# [+MetricService.ListTimeSeries+
|
173
|
+
# request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that
|
174
|
+
# call is useful to verify the time series that will be retrieved /
|
175
|
+
# processed) and must specify the metric type and optionally may contain
|
176
|
+
# restrictions on resource type, resource labels, and metric labels.
|
177
|
+
# This field may not exceed 2048 Unicode characters in length.
|
178
|
+
# @!attribute [rw] aggregations
|
179
|
+
# @return [Array<Google::Monitoring::V3::Aggregation>]
|
180
|
+
# Specifies the alignment of data points in individual time series as
|
181
|
+
# well as how to combine the retrieved time series together (such as
|
182
|
+
# when aggregating multiple streams on each resource to a single
|
183
|
+
# stream for each resource or when aggregating streams across all
|
184
|
+
# members of a group of resrouces). Multiple aggregations
|
185
|
+
# are applied in the order specified.
|
186
|
+
#
|
187
|
+
# This field is similar to the one in the
|
188
|
+
# [+MetricService.ListTimeSeries+ request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
|
189
|
+
# It is advisable to use the +ListTimeSeries+ method when debugging this field.
|
190
|
+
# @!attribute [rw] denominator_filter
|
191
|
+
# @return [String]
|
192
|
+
# A [filter](https://cloud.google.com/monitoring/api/v3/filters) that identifies a time
|
193
|
+
# series that should be used as the denominator of a ratio that will be
|
194
|
+
# compared with the threshold. If a +denominator_filter+ is specified,
|
195
|
+
# the time series specified by the +filter+ field will be used as the
|
196
|
+
# numerator.
|
197
|
+
#
|
198
|
+
# The filter is similar to the one that is specified in the
|
199
|
+
# [+MetricService.ListTimeSeries+
|
200
|
+
# request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that
|
201
|
+
# call is useful to verify the time series that will be retrieved /
|
202
|
+
# processed) and must specify the metric type and optionally may contain
|
203
|
+
# restrictions on resource type, resource labels, and metric labels.
|
204
|
+
# This field may not exceed 2048 Unicode characters in length.
|
205
|
+
# @!attribute [rw] denominator_aggregations
|
206
|
+
# @return [Array<Google::Monitoring::V3::Aggregation>]
|
207
|
+
# Specifies the alignment of data points in individual time series
|
208
|
+
# selected by +denominatorFilter+ as
|
209
|
+
# well as how to combine the retrieved time series together (such as
|
210
|
+
# when aggregating multiple streams on each resource to a single
|
211
|
+
# stream for each resource or when aggregating streams across all
|
212
|
+
# members of a group of resources).
|
213
|
+
#
|
214
|
+
# When computing ratios, the +aggregations+ and
|
215
|
+
# +denominator_aggregations+ fields must use the same alignment period
|
216
|
+
# and produce time series that have the same periodicity and labels.
|
217
|
+
#
|
218
|
+
# This field is similar to the one in the
|
219
|
+
# [+MetricService.ListTimeSeries+
|
220
|
+
# request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It
|
221
|
+
# is advisable to use the +ListTimeSeries+ method when debugging this
|
222
|
+
# field.
|
223
|
+
# @!attribute [rw] comparison
|
224
|
+
# @return [Google::Monitoring::V3::ComparisonType]
|
225
|
+
# The comparison to apply between the time series (indicated by +filter+
|
226
|
+
# and +aggregation+) and the threshold (indicated by +threshold_value+).
|
227
|
+
# The comparison is applied on each time series, with the time series
|
228
|
+
# on the left-hand side and the threshold on the right-hand side.
|
229
|
+
#
|
230
|
+
# Only +COMPARISON_LT+ and +COMPARISON_GT+ are supported currently.
|
231
|
+
# @!attribute [rw] threshold_value
|
232
|
+
# @return [Float]
|
233
|
+
# A value against which to compare the time series.
|
234
|
+
# @!attribute [rw] duration
|
235
|
+
# @return [Google::Protobuf::Duration]
|
236
|
+
# The amount of time that a time series must violate the
|
237
|
+
# threshold to be considered failing. Currently, only values
|
238
|
+
# that are a multiple of a minute--e.g. 60, 120, or 300
|
239
|
+
# seconds--are supported. If an invalid value is given, an
|
240
|
+
# error will be returned. The +Duration.nanos+ field is
|
241
|
+
# ignored. When choosing a duration, it is useful to keep in mind the
|
242
|
+
# frequency of the underlying time series data (which may also be
|
243
|
+
# affected by any alignments specified in the +aggregation+ field);
|
244
|
+
# a good duration is long enough so that a single outlier does not
|
245
|
+
# generate spurious alerts, but short enough that unhealthy states
|
246
|
+
# are detected and alerted on quickly.
|
247
|
+
# @!attribute [rw] trigger
|
248
|
+
# @return [Google::Monitoring::V3::AlertPolicy::Condition::Trigger]
|
249
|
+
# The number/percent of time series for which the comparison must hold
|
250
|
+
# in order for the condition to trigger. If unspecified, then the
|
251
|
+
# condition will trigger if the comparison is true for any of the
|
252
|
+
# time series that have been identified by +filter+ and +aggregations+,
|
253
|
+
# or by the ratio, if +denominator_filter+ and +denominator_aggregations+
|
254
|
+
# are specified.
|
255
|
+
class MetricThreshold; end
|
256
|
+
|
257
|
+
# A condition type that checks that monitored resources
|
258
|
+
# are reporting data. The configuration defines a metric and
|
259
|
+
# a set of monitored resources. The predicate is considered in violation
|
260
|
+
# when a time series for the specified metric of a monitored
|
261
|
+
# resource does not include any data in the specified +duration+.
|
262
|
+
# @!attribute [rw] filter
|
263
|
+
# @return [String]
|
264
|
+
# A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
|
265
|
+
# identifies which time series should be compared with the threshold.
|
266
|
+
#
|
267
|
+
# The filter is similar to the one that is specified in the
|
268
|
+
# [+MetricService.ListTimeSeries+
|
269
|
+
# request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that
|
270
|
+
# call is useful to verify the time series that will be retrieved /
|
271
|
+
# processed) and must specify the metric type and optionally may contain
|
272
|
+
# restrictions on resource type, resource labels, and metric labels.
|
273
|
+
# This field may not exceed 2048 Unicode characters in length.
|
274
|
+
# @!attribute [rw] aggregations
|
275
|
+
# @return [Array<Google::Monitoring::V3::Aggregation>]
|
276
|
+
# Specifies the alignment of data points in individual time series as
|
277
|
+
# well as how to combine the retrieved time series together (such as
|
278
|
+
# when aggregating multiple streams on each resource to a single
|
279
|
+
# stream for each resource or when aggregating streams across all
|
280
|
+
# members of a group of resrouces). Multiple aggregations
|
281
|
+
# are applied in the order specified.
|
282
|
+
#
|
283
|
+
# This field is similar to the
|
284
|
+
# one in the [+MetricService.ListTimeSeries+ request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
|
285
|
+
# It is advisable to use the +ListTimeSeries+ method when debugging this field.
|
286
|
+
# @!attribute [rw] duration
|
287
|
+
# @return [Google::Protobuf::Duration]
|
288
|
+
# The amount of time that a time series must fail to report new
|
289
|
+
# data to be considered failing. Currently, only values that
|
290
|
+
# are a multiple of a minute--e.g. 60, 120, or 300
|
291
|
+
# seconds--are supported. If an invalid value is given, an
|
292
|
+
# error will be returned. The +Duration.nanos+ field is
|
293
|
+
# ignored.
|
294
|
+
# @!attribute [rw] trigger
|
295
|
+
# @return [Google::Monitoring::V3::AlertPolicy::Condition::Trigger]
|
296
|
+
# The number/percent of time series for which the comparison must hold
|
297
|
+
# in order for the condition to trigger. If unspecified, then the
|
298
|
+
# condition will trigger if the comparison is true for any of the
|
299
|
+
# time series that have been identified by +filter+ and +aggregations+.
|
300
|
+
class MetricAbsence; end
|
301
|
+
end
|
302
|
+
|
303
|
+
# Operators for combining conditions.
|
304
|
+
module ConditionCombinerType
|
305
|
+
# An unspecified combiner.
|
306
|
+
COMBINE_UNSPECIFIED = 0
|
307
|
+
|
308
|
+
# Combine conditions using the logical +AND+ operator. An
|
309
|
+
# incident is created only if all conditions are met
|
310
|
+
# simultaneously. This combiner is satisfied if all conditions are
|
311
|
+
# met, even if they are met on completely different resources.
|
312
|
+
AND = 1
|
313
|
+
|
314
|
+
# Combine conditions using the logical +OR+ operator. An incident
|
315
|
+
# is created if any of the listed conditions is met.
|
316
|
+
OR = 2
|
317
|
+
|
318
|
+
# Combine conditions using logical +AND+ operator, but unlike the regular
|
319
|
+
# +AND+ option, an incident is created only if all conditions are met
|
320
|
+
# simultaneously on at least one resource.
|
321
|
+
AND_WITH_MATCHING_RESOURCE = 3
|
322
|
+
end
|
323
|
+
end
|
324
|
+
end
|
325
|
+
end
|
326
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2018 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -50,8 +50,9 @@ module Google
|
|
50
50
|
|
51
51
|
# Describes how to combine multiple time series to provide different views of
|
52
52
|
# the data. Aggregation consists of an alignment step on individual time
|
53
|
-
# series (+per_series_aligner+) followed by an optional
|
54
|
-
#
|
53
|
+
# series (+alignment_period+ and +per_series_aligner+) followed by an optional
|
54
|
+
# reduction step of the data across the aligned time series
|
55
|
+
# (+cross_series_reducer+ and +group_by_fields+). For more details, see
|
55
56
|
# [Aggregation](https://cloud.google.com/monitoring/api/learn_more#aggregation).
|
56
57
|
# @!attribute [rw] alignment_period
|
57
58
|
# @return [Google::Protobuf::Duration]
|
@@ -119,12 +120,23 @@ module Google
|
|
119
120
|
# delta metric to a delta metric requires that the alignment
|
120
121
|
# period be increased. The value type of the result is the same
|
121
122
|
# as the value type of the input.
|
123
|
+
#
|
124
|
+
# One can think of this aligner as a rate but without time units; that
|
125
|
+
# is, the output is conceptually (second_point - first_point).
|
122
126
|
ALIGN_DELTA = 1
|
123
127
|
|
124
128
|
# Align and convert to a rate. This alignment is valid for
|
125
129
|
# cumulative metrics and delta metrics with numeric values. The output is a
|
126
130
|
# gauge metric with value type
|
127
131
|
# {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
|
132
|
+
#
|
133
|
+
# One can think of this aligner as conceptually providing the slope of
|
134
|
+
# the line that passes through the value at the start and end of the
|
135
|
+
# window. In other words, this is conceptually ((y1 - y0)/(t1 - t0)),
|
136
|
+
# and the output unit is one that has a "/time" dimension.
|
137
|
+
#
|
138
|
+
# If, by rate, you are looking for percentage change, see the
|
139
|
+
# +ALIGN_PERCENT_CHANGE+ aligner option.
|
128
140
|
ALIGN_RATE = 2
|
129
141
|
|
130
142
|
# Align by interpolating between adjacent points around the
|
@@ -188,6 +200,13 @@ module Google
|
|
188
200
|
# {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
|
189
201
|
ALIGN_COUNT_TRUE = 16
|
190
202
|
|
203
|
+
# Align time series via aggregation. The resulting data point in
|
204
|
+
# the alignment period is the count of False-valued data points in the
|
205
|
+
# period. This alignment is valid for gauge metrics with
|
206
|
+
# Boolean values. The value type of the output is
|
207
|
+
# {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
|
208
|
+
ALIGN_COUNT_FALSE = 24
|
209
|
+
|
191
210
|
# Align time series via aggregation. The resulting data point in
|
192
211
|
# the alignment period is the fraction of True-valued data points in the
|
193
212
|
# period. This alignment is valid for gauge metrics with Boolean values.
|
@@ -222,6 +241,23 @@ module Google
|
|
222
241
|
# with distribution values. The output is a gauge metric with value type
|
223
242
|
# {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
|
224
243
|
ALIGN_PERCENTILE_05 = 21
|
244
|
+
|
245
|
+
# Align and convert to a percentage change. This alignment is valid for
|
246
|
+
# gauge and delta metrics with numeric values. This alignment conceptually
|
247
|
+
# computes the equivalent of "((current - previous)/previous)*100"
|
248
|
+
# where previous value is determined based on the alignmentPeriod.
|
249
|
+
# In the event that previous is 0 the calculated value is infinity with the
|
250
|
+
# exception that if both (current - previous) and previous are 0 the
|
251
|
+
# calculated value is 0.
|
252
|
+
# A 10 minute moving mean is computed at each point of the time window
|
253
|
+
# prior to the above calculation to smooth the metric and prevent false
|
254
|
+
# positives from very short lived spikes.
|
255
|
+
# Only applicable for data that is >= 0. Any values < 0 are treated as
|
256
|
+
# no data. While delta metrics are accepted by this alignment special care
|
257
|
+
# should be taken that the values for the metric will always be positive.
|
258
|
+
# The output is a gauge metric with value type
|
259
|
+
# {Google::Api::MetricDescriptor::ValueType::DOUBLE DOUBLE}.
|
260
|
+
ALIGN_PERCENT_CHANGE = 23
|
225
261
|
end
|
226
262
|
|
227
263
|
# A Reducer describes how to aggregate data points from multiple
|
@@ -274,6 +310,12 @@ module Google
|
|
274
310
|
# the output is {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
|
275
311
|
REDUCE_COUNT_TRUE = 7
|
276
312
|
|
313
|
+
# Reduce by computing the count of False-valued data points across time
|
314
|
+
# series for each alignment period. This reducer is valid for delta
|
315
|
+
# and gauge metrics of Boolean value type. The value type of
|
316
|
+
# the output is {Google::Api::MetricDescriptor::ValueType::INT64 INT64}.
|
317
|
+
REDUCE_COUNT_FALSE = 15
|
318
|
+
|
277
319
|
# Reduce by computing the fraction of True-valued data points across time
|
278
320
|
# series for each alignment period. This reducer is valid for delta
|
279
321
|
# and gauge metrics of Boolean value type. The output value is in the
|
@@ -306,6 +348,52 @@ module Google
|
|
306
348
|
REDUCE_PERCENTILE_05 = 12
|
307
349
|
end
|
308
350
|
end
|
351
|
+
|
352
|
+
# Specifies an ordering relationship on two arguments, here called left and
|
353
|
+
# right.
|
354
|
+
module ComparisonType
|
355
|
+
# No ordering relationship is specified.
|
356
|
+
COMPARISON_UNSPECIFIED = 0
|
357
|
+
|
358
|
+
# The left argument is greater than the right argument.
|
359
|
+
COMPARISON_GT = 1
|
360
|
+
|
361
|
+
# The left argument is greater than or equal to the right argument.
|
362
|
+
COMPARISON_GE = 2
|
363
|
+
|
364
|
+
# The left argument is less than the right argument.
|
365
|
+
COMPARISON_LT = 3
|
366
|
+
|
367
|
+
# The left argument is less than or equal to the right argument.
|
368
|
+
COMPARISON_LE = 4
|
369
|
+
|
370
|
+
# The left argument is equal to the right argument.
|
371
|
+
COMPARISON_EQ = 5
|
372
|
+
|
373
|
+
# The left argument is not equal to the right argument.
|
374
|
+
COMPARISON_NE = 6
|
375
|
+
end
|
376
|
+
|
377
|
+
# The tier of service for a Stackdriver account. Please see the
|
378
|
+
# [service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers)
|
379
|
+
# for more details.
|
380
|
+
module ServiceTier
|
381
|
+
# An invalid sentinel value, used to indicate that a tier has not
|
382
|
+
# been provided explicitly.
|
383
|
+
SERVICE_TIER_UNSPECIFIED = 0
|
384
|
+
|
385
|
+
# The Stackdriver Basic tier, a free tier of service that provides basic
|
386
|
+
# features, a moderate allotment of logs, and access to built-in metrics.
|
387
|
+
# A number of features are not available in this tier. For more details,
|
388
|
+
# see [the service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers).
|
389
|
+
SERVICE_TIER_BASIC = 1
|
390
|
+
|
391
|
+
# The Stackdriver Premium tier, a higher, more expensive tier of service
|
392
|
+
# that provides access to all Stackdriver features, lets you use Stackdriver
|
393
|
+
# with AWS accounts, and has a larger allotments for logs and metrics. For
|
394
|
+
# more details, see [the service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers).
|
395
|
+
SERVICE_TIER_PREMIUM = 2
|
396
|
+
end
|
309
397
|
end
|
310
398
|
end
|
311
399
|
end
|