google-cloud-monitoring 0.37.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -54
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +361 -0
  6. data/README.md +93 -50
  7. data/lib/google-cloud-monitoring.rb +6 -5
  8. data/lib/google/cloud/monitoring.rb +255 -443
  9. data/lib/google/cloud/monitoring/dashboard.rb +88 -117
  10. data/lib/google/cloud/monitoring/{v3/doc/google/protobuf/wrappers.rb → dashboard/version.rb} +12 -9
  11. data/lib/google/cloud/monitoring/version.rb +6 -2
  12. metadata +72 -129
  13. data/LICENSE +0 -201
  14. data/lib/google/cloud/monitoring/dashboard/v1.rb +0 -148
  15. data/lib/google/cloud/monitoring/dashboard/v1/credentials.rb +0 -46
  16. data/lib/google/cloud/monitoring/dashboard/v1/dashboards_service_client.rb +0 -457
  17. data/lib/google/cloud/monitoring/dashboard/v1/dashboards_service_client_config.json +0 -51
  18. data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/common.rb +0 -394
  19. data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/dashboard.rb +0 -53
  20. data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/dashboards_service.rb +0 -82
  21. data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/layouts.rb +0 -71
  22. data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/metrics.rb +0 -151
  23. data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/scorecard.rb +0 -102
  24. data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/text.rb +0 -43
  25. data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/widget.rb +0 -41
  26. data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/xychart.rb +0 -141
  27. data/lib/google/cloud/monitoring/dashboard/v1/doc/google/protobuf/duration.rb +0 -91
  28. data/lib/google/cloud/monitoring/dashboard/v1/doc/google/protobuf/empty.rb +0 -29
  29. data/lib/google/cloud/monitoring/v3.rb +0 -532
  30. data/lib/google/cloud/monitoring/v3/alert_policy_service_client.rb +0 -553
  31. data/lib/google/cloud/monitoring/v3/alert_policy_service_client_config.json +0 -51
  32. data/lib/google/cloud/monitoring/v3/credentials.rb +0 -44
  33. data/lib/google/cloud/monitoring/v3/doc/google/api/distribution.rb +0 -200
  34. data/lib/google/cloud/monitoring/v3/doc/google/api/label.rb +0 -42
  35. data/lib/google/cloud/monitoring/v3/doc/google/api/metric.rb +0 -245
  36. data/lib/google/cloud/monitoring/v3/doc/google/api/monitored_resource.rb +0 -108
  37. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/alert.rb +0 -345
  38. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/alert_service.rb +0 -138
  39. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/common.rb +0 -449
  40. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/group.rb +0 -75
  41. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/group_service.rb +0 -167
  42. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/metric.rb +0 -85
  43. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/metric_service.rb +0 -230
  44. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/mutation_record.rb +0 -29
  45. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/notification.rb +0 -156
  46. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/notification_service.rb +0 -221
  47. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/service.rb +0 -361
  48. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/service_service.rb +0 -197
  49. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/uptime.rb +0 -326
  50. data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/uptime_service.rb +0 -136
  51. data/lib/google/cloud/monitoring/v3/doc/google/protobuf/any.rb +0 -131
  52. data/lib/google/cloud/monitoring/v3/doc/google/protobuf/duration.rb +0 -91
  53. data/lib/google/cloud/monitoring/v3/doc/google/protobuf/empty.rb +0 -29
  54. data/lib/google/cloud/monitoring/v3/doc/google/protobuf/field_mask.rb +0 -222
  55. data/lib/google/cloud/monitoring/v3/doc/google/protobuf/struct.rb +0 -74
  56. data/lib/google/cloud/monitoring/v3/doc/google/protobuf/timestamp.rb +0 -113
  57. data/lib/google/cloud/monitoring/v3/doc/google/rpc/status.rb +0 -39
  58. data/lib/google/cloud/monitoring/v3/group_service_client.rb +0 -606
  59. data/lib/google/cloud/monitoring/v3/group_service_client_config.json +0 -56
  60. data/lib/google/cloud/monitoring/v3/metric_service_client.rb +0 -750
  61. data/lib/google/cloud/monitoring/v3/metric_service_client_config.json +0 -66
  62. data/lib/google/cloud/monitoring/v3/notification_channel_service_client.rb +0 -811
  63. data/lib/google/cloud/monitoring/v3/notification_channel_service_client_config.json +0 -76
  64. data/lib/google/cloud/monitoring/v3/service_monitoring_service_client.rb +0 -788
  65. data/lib/google/cloud/monitoring/v3/service_monitoring_service_client_config.json +0 -76
  66. data/lib/google/cloud/monitoring/v3/uptime_check_service_client.rb +0 -550
  67. data/lib/google/cloud/monitoring/v3/uptime_check_service_client_config.json +0 -56
  68. data/lib/google/monitoring/dashboard/v1/common_pb.rb +0 -95
  69. data/lib/google/monitoring/dashboard/v1/dashboard_pb.rb +0 -29
  70. data/lib/google/monitoring/dashboard/v1/dashboards_service_pb.rb +0 -51
  71. data/lib/google/monitoring/dashboard/v1/dashboards_service_services_pb.rb +0 -76
  72. data/lib/google/monitoring/dashboard/v1/drilldowns_pb.rb +0 -17
  73. data/lib/google/monitoring/dashboard/v1/layouts_pb.rb +0 -41
  74. data/lib/google/monitoring/dashboard/v1/metrics_pb.rb +0 -76
  75. data/lib/google/monitoring/dashboard/v1/scorecard_pb.rb +0 -38
  76. data/lib/google/monitoring/dashboard/v1/service_pb.rb +0 -17
  77. data/lib/google/monitoring/dashboard/v1/text_pb.rb +0 -28
  78. data/lib/google/monitoring/dashboard/v1/widget_pb.rb +0 -32
  79. data/lib/google/monitoring/dashboard/v1/xychart_pb.rb +0 -66
  80. data/lib/google/monitoring/v3/alert_pb.rb +0 -87
  81. data/lib/google/monitoring/v3/alert_service_pb.rb +0 -53
  82. data/lib/google/monitoring/v3/alert_service_services_pb.rb +0 -63
  83. data/lib/google/monitoring/v3/common_pb.rb +0 -95
  84. data/lib/google/monitoring/v3/dropped_labels_pb.rb +0 -19
  85. data/lib/google/monitoring/v3/group_pb.rb +0 -24
  86. data/lib/google/monitoring/v3/group_service_pb.rb +0 -73
  87. data/lib/google/monitoring/v3/group_service_services_pb.rb +0 -66
  88. data/lib/google/monitoring/v3/metric_pb.rb +0 -82
  89. data/lib/google/monitoring/v3/metric_service_pb.rb +0 -130
  90. data/lib/google/monitoring/v3/metric_service_services_pb.rb +0 -66
  91. data/lib/google/monitoring/v3/mutation_record_pb.rb +0 -21
  92. data/lib/google/monitoring/v3/notification_pb.rb +0 -47
  93. data/lib/google/monitoring/v3/notification_service_pb.rb +0 -90
  94. data/lib/google/monitoring/v3/notification_service_services_pb.rb +0 -94
  95. data/lib/google/monitoring/v3/service_pb.rb +0 -149
  96. data/lib/google/monitoring/v3/service_service_pb.rb +0 -86
  97. data/lib/google/monitoring/v3/service_service_services_pb.rb +0 -65
  98. data/lib/google/monitoring/v3/span_context_pb.rb +0 -19
  99. data/lib/google/monitoring/v3/uptime_pb.rb +0 -109
  100. data/lib/google/monitoring/v3/uptime_service_pb.rb +0 -63
  101. data/lib/google/monitoring/v3/uptime_service_services_pb.rb +0 -67
@@ -1,108 +0,0 @@
1
- # Copyright 2020 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
-
16
- module Google
17
- module Api
18
- # An object that describes the schema of a {Google::Api::MonitoredResource MonitoredResource} object using a
19
- # type name and a set of labels. For example, the monitored resource
20
- # descriptor for Google Compute Engine VM instances has a type of
21
- # `"gce_instance"` and specifies the use of the labels `"instance_id"` and
22
- # `"zone"` to identify particular VM instances.
23
- #
24
- # Different APIs can support different monitored resource types. APIs generally
25
- # provide a `list` method that returns the monitored resource descriptors used
26
- # by the API.
27
- # @!attribute [rw] name
28
- # @return [String]
29
- # Optional. The resource name of the monitored resource descriptor:
30
- # `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
31
- # \\{type} is the value of the `type` field in this object and
32
- # \\{project_id} is a project ID that provides API-specific context for
33
- # accessing the type. APIs that do not use project information can use the
34
- # resource name format `"monitoredResourceDescriptors/{type}"`.
35
- # @!attribute [rw] type
36
- # @return [String]
37
- # Required. The monitored resource type. For example, the type
38
- # `"cloudsql_database"` represents databases in Google Cloud SQL.
39
- # The maximum length of this value is 256 characters.
40
- # @!attribute [rw] display_name
41
- # @return [String]
42
- # Optional. A concise name for the monitored resource type that might be
43
- # displayed in user interfaces. It should be a Title Cased Noun Phrase,
44
- # without any article or other determiners. For example,
45
- # `"Google Cloud SQL Database"`.
46
- # @!attribute [rw] description
47
- # @return [String]
48
- # Optional. A detailed description of the monitored resource type that might
49
- # be used in documentation.
50
- # @!attribute [rw] labels
51
- # @return [Array<Google::Api::LabelDescriptor>]
52
- # Required. A set of labels used to describe instances of this monitored
53
- # resource type. For example, an individual Google Cloud SQL database is
54
- # identified by values for the labels `"database_id"` and `"zone"`.
55
- # @!attribute [rw] launch_stage
56
- # @return [Google::Api::LaunchStage]
57
- # Optional. The launch stage of the monitored resource definition.
58
- class MonitoredResourceDescriptor; end
59
-
60
- # An object representing a resource that can be used for monitoring, logging,
61
- # billing, or other purposes. Examples include virtual machine instances,
62
- # databases, and storage devices such as disks. The `type` field identifies a
63
- # {Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} object that describes the resource's
64
- # schema. Information in the `labels` field identifies the actual resource and
65
- # its attributes according to the schema. For example, a particular Compute
66
- # Engine VM instance could be represented by the following object, because the
67
- # {Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} for `"gce_instance"` has labels
68
- # `"instance_id"` and `"zone"`:
69
- #
70
- # { "type": "gce_instance",
71
- # "labels": { "instance_id": "12345678901234",
72
- # "zone": "us-central1-a" }}
73
- # @!attribute [rw] type
74
- # @return [String]
75
- # Required. The monitored resource type. This field must match
76
- # the `type` field of a {Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} object. For
77
- # example, the type of a Compute Engine VM instance is `gce_instance`.
78
- # @!attribute [rw] labels
79
- # @return [Hash{String => String}]
80
- # Required. Values for all of the labels listed in the associated monitored
81
- # resource descriptor. For example, Compute Engine VM instances use the
82
- # labels `"project_id"`, `"instance_id"`, and `"zone"`.
83
- class MonitoredResource; end
84
-
85
- # Auxiliary metadata for a {Google::Api::MonitoredResource MonitoredResource} object.
86
- # {Google::Api::MonitoredResource MonitoredResource} objects contain the minimum set of information to
87
- # uniquely identify a monitored resource instance. There is some other useful
88
- # auxiliary metadata. Monitoring and Logging use an ingestion
89
- # pipeline to extract metadata for cloud resources of all types, and store
90
- # the metadata in this message.
91
- # @!attribute [rw] system_labels
92
- # @return [Google::Protobuf::Struct]
93
- # Output only. Values for predefined system metadata labels.
94
- # System labels are a kind of metadata extracted by Google, including
95
- # "machine_image", "vpc", "subnet_id",
96
- # "security_group", "name", etc.
97
- # System label values can be only strings, Boolean values, or a list of
98
- # strings. For example:
99
- #
100
- # { "name": "my-test-instance",
101
- # "security_group": ["a", "b", "c"],
102
- # "spot_instance": false }
103
- # @!attribute [rw] user_labels
104
- # @return [Hash{String => String}]
105
- # Output only. A map of user-defined metadata labels.
106
- class MonitoredResourceMetadata; end
107
- end
108
- end
@@ -1,345 +0,0 @@
1
- # Copyright 2020 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
-
16
- module Google
17
- module Monitoring
18
- module V3
19
- # A description of the conditions under which some aspect of your system is
20
- # considered to be "unhealthy" and the ways to notify people or services about
21
- # this state. For an overview of alert policies, see
22
- # [Introduction to Alerting](https://cloud.google.com/monitoring/alerts/).
23
- # @!attribute [rw] name
24
- # @return [String]
25
- # Required if the policy exists. The resource name for this policy. The
26
- # format is:
27
- #
28
- # projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
29
- #
30
- # `[ALERT_POLICY_ID]` is assigned by Stackdriver Monitoring when the policy
31
- # is created. When calling the
32
- # {Google::Monitoring::V3::AlertPolicyService::CreateAlertPolicy alertPolicies::create}
33
- # method, do not include the `name` field in the alerting policy passed as
34
- # part of the request.
35
- # @!attribute [rw] display_name
36
- # @return [String]
37
- # A short name or phrase used to identify the policy in dashboards,
38
- # notifications, and incidents. To avoid confusion, don't use the same
39
- # display name for multiple policies in the same project. The name is
40
- # limited to 512 Unicode characters.
41
- # @!attribute [rw] documentation
42
- # @return [Google::Monitoring::V3::AlertPolicy::Documentation]
43
- # Documentation that is included with notifications and incidents related to
44
- # this policy. Best practice is for the documentation to include information
45
- # to help responders understand, mitigate, escalate, and correct the
46
- # underlying problems detected by the alerting policy. Notification channels
47
- # that have limited capacity might not show this documentation.
48
- # @!attribute [rw] user_labels
49
- # @return [Hash{String => String}]
50
- # User-supplied key/value data to be used for organizing and
51
- # identifying the `AlertPolicy` objects.
52
- #
53
- # The field can contain up to 64 entries. Each key and value is limited to
54
- # 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
55
- # values can contain only lowercase letters, numerals, underscores, and
56
- # dashes. Keys must begin with a letter.
57
- # @!attribute [rw] conditions
58
- # @return [Array<Google::Monitoring::V3::AlertPolicy::Condition>]
59
- # A list of conditions for the policy. The conditions are combined by AND or
60
- # OR according to the `combiner` field. If the combined conditions evaluate
61
- # to true, then an incident is created. A policy can have from one to six
62
- # conditions.
63
- # If `condition_time_series_query_language` is present, it must be the only
64
- # `condition`.
65
- # @!attribute [rw] combiner
66
- # @return [Google::Monitoring::V3::AlertPolicy::ConditionCombinerType]
67
- # How to combine the results of multiple conditions to determine if an
68
- # incident should be opened.
69
- # If `condition_time_series_query_language` is present, this must be
70
- # `COMBINE_UNSPECIFIED`.
71
- # @!attribute [rw] enabled
72
- # @return [Google::Protobuf::BoolValue]
73
- # Whether or not the policy is enabled. On write, the default interpretation
74
- # if unset is that the policy is enabled. On read, clients should not make
75
- # any assumption about the state if it has not been populated. The
76
- # field should always be populated on List and Get operations, unless
77
- # a field projection has been specified that strips it out.
78
- # @!attribute [rw] validity
79
- # @return [Google::Rpc::Status]
80
- # Read-only description of how the alert policy is invalid. OK if the alert
81
- # policy is valid. If not OK, the alert policy will not generate incidents.
82
- # @!attribute [rw] notification_channels
83
- # @return [Array<String>]
84
- # Identifies the notification channels to which notifications should be sent
85
- # when incidents are opened or closed or when new violations occur on
86
- # an already opened incident. Each element of this array corresponds to
87
- # the `name` field in each of the
88
- # {Google::Monitoring::V3::NotificationChannel `NotificationChannel`}
89
- # objects that are returned from the [`ListNotificationChannels`]
90
- # [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
91
- # method. The format of the entries in this field is:
92
- #
93
- # projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
94
- # @!attribute [rw] creation_record
95
- # @return [Google::Monitoring::V3::MutationRecord]
96
- # A read-only record of the creation of the alerting policy. If provided
97
- # in a call to create or update, this field will be ignored.
98
- # @!attribute [rw] mutation_record
99
- # @return [Google::Monitoring::V3::MutationRecord]
100
- # A read-only record of the most recent change to the alerting policy. If
101
- # provided in a call to create or update, this field will be ignored.
102
- class AlertPolicy
103
- # A content string and a MIME type that describes the content string's
104
- # format.
105
- # @!attribute [rw] content
106
- # @return [String]
107
- # The text of the documentation, interpreted according to `mime_type`.
108
- # The content may not exceed 8,192 Unicode characters and may not exceed
109
- # more than 10,240 bytes when encoded in UTF-8 format, whichever is
110
- # smaller.
111
- # @!attribute [rw] mime_type
112
- # @return [String]
113
- # The format of the `content` field. Presently, only the value
114
- # `"text/markdown"` is supported. See
115
- # [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
116
- class Documentation; end
117
-
118
- # A condition is a true/false test that determines when an alerting policy
119
- # should open an incident. If a condition evaluates to true, it signifies
120
- # that something is wrong.
121
- # @!attribute [rw] name
122
- # @return [String]
123
- # Required if the condition exists. The unique resource name for this
124
- # condition. Its format is:
125
- #
126
- # projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
127
- #
128
- # `[CONDITION_ID]` is assigned by Stackdriver Monitoring when the
129
- # condition is created as part of a new or updated alerting policy.
130
- #
131
- # When calling the
132
- # {Google::Monitoring::V3::AlertPolicyService::CreateAlertPolicy alertPolicies::create}
133
- # method, do not include the `name` field in the conditions of the
134
- # requested alerting policy. Stackdriver Monitoring creates the
135
- # condition identifiers and includes them in the new policy.
136
- #
137
- # When calling the
138
- # {Google::Monitoring::V3::AlertPolicyService::UpdateAlertPolicy alertPolicies::update}
139
- # method to update a policy, including a condition `name` causes the
140
- # existing condition to be updated. Conditions without names are added to
141
- # the updated policy. Existing conditions are deleted if they are not
142
- # updated.
143
- #
144
- # Best practice is to preserve `[CONDITION_ID]` if you make only small
145
- # changes, such as those to condition thresholds, durations, or trigger
146
- # values. Otherwise, treat the change as a new condition and let the
147
- # existing condition be deleted.
148
- # @!attribute [rw] display_name
149
- # @return [String]
150
- # A short name or phrase used to identify the condition in dashboards,
151
- # notifications, and incidents. To avoid confusion, don't use the same
152
- # display name for multiple conditions in the same policy.
153
- # @!attribute [rw] condition_threshold
154
- # @return [Google::Monitoring::V3::AlertPolicy::Condition::MetricThreshold]
155
- # A condition that compares a time series against a threshold.
156
- # @!attribute [rw] condition_absent
157
- # @return [Google::Monitoring::V3::AlertPolicy::Condition::MetricAbsence]
158
- # A condition that checks that a time series continues to
159
- # receive new data points.
160
- # @!attribute [rw] condition_time_series_query_language
161
- # @return [Google::Monitoring::V3::AlertPolicy::Condition::TimeSeriesQueryLanguageCondition]
162
- # A condition that uses the time series query language format to define
163
- # alerts.
164
- # If set, no other conditions can be present.
165
- class Condition
166
- # Specifies how many time series must fail a predicate to trigger a
167
- # condition. If not specified, then a `{count: 1}` trigger is used.
168
- # @!attribute [rw] count
169
- # @return [Integer]
170
- # The absolute number of time series that must fail
171
- # the predicate for the condition to be triggered.
172
- # @!attribute [rw] percent
173
- # @return [Float]
174
- # The percentage of time series that must fail the
175
- # predicate for the condition to be triggered.
176
- class Trigger; end
177
-
178
- # A condition type that compares a collection of time series
179
- # against a threshold.
180
- # @!attribute [rw] filter
181
- # @return [String]
182
- # A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
183
- # identifies which time series should be compared with the threshold.
184
- #
185
- # The filter is similar to the one that is specified in the
186
- # [`ListTimeSeries`
187
- # request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
188
- # (that call is useful to verify the time series that will be retrieved /
189
- # processed) and must specify the metric type and optionally may contain
190
- # restrictions on resource type, resource labels, and metric labels.
191
- # This field may not exceed 2048 Unicode characters in length.
192
- # @!attribute [rw] aggregations
193
- # @return [Array<Google::Monitoring::V3::Aggregation>]
194
- # Specifies the alignment of data points in individual time series as
195
- # well as how to combine the retrieved time series together (such as
196
- # when aggregating multiple streams on each resource to a single
197
- # stream for each resource or when aggregating streams across all
198
- # members of a group of resrouces). Multiple aggregations
199
- # are applied in the order specified.
200
- #
201
- # This field is similar to the one in the [`ListTimeSeries`
202
- # request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
203
- # It is advisable to use the `ListTimeSeries` method when debugging this
204
- # field.
205
- # @!attribute [rw] denominator_filter
206
- # @return [String]
207
- # A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
208
- # identifies a time series that should be used as the denominator of a
209
- # ratio that will be compared with the threshold. If a
210
- # `denominator_filter` is specified, the time series specified by the
211
- # `filter` field will be used as the numerator.
212
- #
213
- # The filter must specify the metric type and optionally may contain
214
- # restrictions on resource type, resource labels, and metric labels.
215
- # This field may not exceed 2048 Unicode characters in length.
216
- # @!attribute [rw] denominator_aggregations
217
- # @return [Array<Google::Monitoring::V3::Aggregation>]
218
- # Specifies the alignment of data points in individual time series
219
- # selected by `denominatorFilter` as
220
- # well as how to combine the retrieved time series together (such as
221
- # when aggregating multiple streams on each resource to a single
222
- # stream for each resource or when aggregating streams across all
223
- # members of a group of resources).
224
- #
225
- # When computing ratios, the `aggregations` and
226
- # `denominator_aggregations` fields must use the same alignment period
227
- # and produce time series that have the same periodicity and labels.
228
- # @!attribute [rw] comparison
229
- # @return [Google::Monitoring::V3::ComparisonType]
230
- # The comparison to apply between the time series (indicated by `filter`
231
- # and `aggregation`) and the threshold (indicated by `threshold_value`).
232
- # The comparison is applied on each time series, with the time series
233
- # on the left-hand side and the threshold on the right-hand side.
234
- #
235
- # Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently.
236
- # @!attribute [rw] threshold_value
237
- # @return [Float]
238
- # A value against which to compare the time series.
239
- # @!attribute [rw] duration
240
- # @return [Google::Protobuf::Duration]
241
- # The amount of time that a time series must violate the
242
- # threshold to be considered failing. Currently, only values
243
- # that are a multiple of a minute--e.g., 0, 60, 120, or 300
244
- # seconds--are supported. If an invalid value is given, an
245
- # error will be returned. When choosing a duration, it is useful to
246
- # keep in mind the frequency of the underlying time series data
247
- # (which may also be affected by any alignments specified in the
248
- # `aggregations` field); a good duration is long enough so that a single
249
- # outlier does not generate spurious alerts, but short enough that
250
- # unhealthy states are detected and alerted on quickly.
251
- # @!attribute [rw] trigger
252
- # @return [Google::Monitoring::V3::AlertPolicy::Condition::Trigger]
253
- # The number/percent of time series for which the comparison must hold
254
- # in order for the condition to trigger. If unspecified, then the
255
- # condition will trigger if the comparison is true for any of the
256
- # time series that have been identified by `filter` and `aggregations`,
257
- # or by the ratio, if `denominator_filter` and `denominator_aggregations`
258
- # are specified.
259
- class MetricThreshold; end
260
-
261
- # A condition type that checks that monitored resources
262
- # are reporting data. The configuration defines a metric and
263
- # a set of monitored resources. The predicate is considered in violation
264
- # when a time series for the specified metric of a monitored
265
- # resource does not include any data in the specified `duration`.
266
- # @!attribute [rw] filter
267
- # @return [String]
268
- # A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
269
- # identifies which time series should be compared with the threshold.
270
- #
271
- # The filter is similar to the one that is specified in the
272
- # [`ListTimeSeries`
273
- # request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
274
- # (that call is useful to verify the time series that will be retrieved /
275
- # processed) and must specify the metric type and optionally may contain
276
- # restrictions on resource type, resource labels, and metric labels.
277
- # This field may not exceed 2048 Unicode characters in length.
278
- # @!attribute [rw] aggregations
279
- # @return [Array<Google::Monitoring::V3::Aggregation>]
280
- # Specifies the alignment of data points in individual time series as
281
- # well as how to combine the retrieved time series together (such as
282
- # when aggregating multiple streams on each resource to a single
283
- # stream for each resource or when aggregating streams across all
284
- # members of a group of resrouces). Multiple aggregations
285
- # are applied in the order specified.
286
- #
287
- # This field is similar to the one in the [`ListTimeSeries`
288
- # request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
289
- # It is advisable to use the `ListTimeSeries` method when debugging this
290
- # field.
291
- # @!attribute [rw] duration
292
- # @return [Google::Protobuf::Duration]
293
- # The amount of time that a time series must fail to report new
294
- # data to be considered failing. Currently, only values that
295
- # are a multiple of a minute--e.g. 60, 120, or 300
296
- # seconds--are supported. If an invalid value is given, an
297
- # error will be returned. The `Duration.nanos` field is
298
- # ignored.
299
- # @!attribute [rw] trigger
300
- # @return [Google::Monitoring::V3::AlertPolicy::Condition::Trigger]
301
- # The number/percent of time series for which the comparison must hold
302
- # in order for the condition to trigger. If unspecified, then the
303
- # condition will trigger if the comparison is true for any of the
304
- # time series that have been identified by `filter` and `aggregations`.
305
- class MetricAbsence; end
306
-
307
- # A condition type that allows alert policies to be defined using the
308
- # time series query language.
309
- # @!attribute [rw] query
310
- # @return [String]
311
- # A query in the time series query language format that generates time
312
- # series indicating points in time that the condition should be
313
- # considered active.
314
- # @!attribute [rw] summary
315
- # @return [String]
316
- # A short explanation of what the query represents. For example:
317
- #
318
- # "Error ratio exceeds 15% for >5% of servers in >2 regions"
319
- class TimeSeriesQueryLanguageCondition; end
320
- end
321
-
322
- # Operators for combining conditions.
323
- module ConditionCombinerType
324
- # An unspecified combiner.
325
- COMBINE_UNSPECIFIED = 0
326
-
327
- # Combine conditions using the logical `AND` operator. An
328
- # incident is created only if all the conditions are met
329
- # simultaneously. This combiner is satisfied if all conditions are
330
- # met, even if they are met on completely different resources.
331
- AND = 1
332
-
333
- # Combine conditions using the logical `OR` operator. An incident
334
- # is created if any of the listed conditions is met.
335
- OR = 2
336
-
337
- # Combine conditions using logical `AND` operator, but unlike the regular
338
- # `AND` option, an incident is created only if all conditions are met
339
- # simultaneously on at least one resource.
340
- AND_WITH_MATCHING_RESOURCE = 3
341
- end
342
- end
343
- end
344
- end
345
- end