36
36
class AlertPolicy (proto .Message ):
37
37
r"""A description of the conditions under which some aspect of your
38
38
system is considered to be "unhealthy" and the ways to notify people
39
- or services about this state. For an overview of alert policies, see
40
- `Introduction to
39
+ or services about this state. For an overview of alerting policies,
40
+ see `Introduction to
41
41
Alerting <https://cloud.google.com/monitoring/alerts/>`__.
42
42
43
43
Attributes:
44
44
name (str):
45
- Required if the policy exists. The resource name for this
46
- policy. The format is:
45
+ Identifier. Required if the policy exists. The resource name
46
+ for this policy. The format is:
47
47
48
48
::
49
49
@@ -118,10 +118,10 @@ class AlertPolicy(proto.Message):
118
118
unless a field projection has been specified
119
119
that strips it out.
120
120
validity (google.rpc.status_pb2.Status):
121
- Read-only description of how the alert policy
122
- is invalid. This field is only set when the
123
- alert policy is invalid. An invalid alert policy
124
- will not generate incidents.
121
+ Read-only description of how the alerting
122
+ policy is invalid. This field is only set when
123
+ the alerting policy is invalid. An invalid
124
+ alerting policy will not generate incidents.
125
125
notification_channels (MutableSequence[str]):
126
126
Identifies the notification channels to which notifications
127
127
should be sent when incidents are opened or closed or when
@@ -146,10 +146,10 @@ class AlertPolicy(proto.Message):
146
146
to the alerting policy. If provided in a call to
147
147
create or update, this field will be ignored.
148
148
alert_strategy (google.cloud.monitoring_v3.types.AlertPolicy.AlertStrategy):
149
- Control over how this alert policy's
149
+ Control over how this alerting policy's
150
150
notification channels are notified.
151
151
severity (google.cloud.monitoring_v3.types.AlertPolicy.Severity):
152
- Optional. The severity of an alert policy
152
+ Optional. The severity of an alerting policy
153
153
indicates how important incidents generated by
154
154
that policy are. The severity level will be
155
155
displayed on the Incident detail page and in
@@ -183,8 +183,8 @@ class ConditionCombinerType(proto.Enum):
183
183
AND_WITH_MATCHING_RESOURCE = 3
184
184
185
185
class Severity (proto .Enum ):
186
- r"""An enumeration of possible severity level for an Alert
187
- Policy .
186
+ r"""An enumeration of possible severity level for an alerting
187
+ policy .
188
188
189
189
Values:
190
190
SEVERITY_UNSPECIFIED (0):
@@ -220,7 +220,7 @@ class Documentation(proto.Message):
220
220
characters and may not exceed more than 10,240 bytes when
221
221
encoded in UTF-8 format, whichever is smaller. This text can
222
222
be `templatized by using
223
- variables <https://cloud.google.com/monitoring/alerts/doc-variables>`__.
223
+ variables <https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars >`__.
224
224
mime_type (str):
225
225
The format of the ``content`` field. Presently, only the
226
226
value ``"text/markdown"`` is supported. See
@@ -240,7 +240,7 @@ class Documentation(proto.Message):
240
240
241
241
The contents of the subject line can be `templatized by
242
242
using
243
- variables <https://cloud.google.com/monitoring/alerts/doc-variables>`__.
243
+ variables <https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars >`__.
244
244
If this field is missing or empty, a default subject line
245
245
will be generated.
246
246
links (MutableSequence[google.cloud.monitoring_v3.types.AlertPolicy.Documentation.Link]):
@@ -712,7 +712,7 @@ class LogMatch(proto.Message):
712
712
)
713
713
714
714
class MonitoringQueryLanguageCondition (proto .Message ):
715
- r"""A condition type that allows alert policies to be defined using
715
+ r"""A condition type that allows alerting policies to be defined using
716
716
`Monitoring Query
717
717
Language <https://cloud.google.com/monitoring/mql>`__.
718
718
@@ -770,7 +770,7 @@ class MonitoringQueryLanguageCondition(proto.Message):
770
770
)
771
771
772
772
class PrometheusQueryLanguageCondition (proto .Message ):
773
- r"""A condition type that allows alert policies to be defined using
773
+ r"""A condition type that allows alerting policies to be defined using
774
774
`Prometheus Query Language
775
775
(PromQL) <https://prometheus.io/docs/prometheus/latest/querying/basics/>`__.
776
776
@@ -831,7 +831,7 @@ class PrometheusQueryLanguageCondition(proto.Message):
831
831
result. Label names `must be
832
832
valid <https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels>`__.
833
833
Label values can be `templatized by using
834
- variables <https://cloud.google.com/monitoring/alerts/doc-variables>`__.
834
+ variables <https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars >`__.
835
835
The only available variable names are the names of the
836
836
labels in the PromQL result, including "**name**" and
837
837
"value". "labels" may be empty.
@@ -942,21 +942,41 @@ class AlertStrategy(proto.Message):
942
942
943
943
Attributes:
944
944
notification_rate_limit (google.cloud.monitoring_v3.types.AlertPolicy.AlertStrategy.NotificationRateLimit):
945
- Required for alert policies with a ``LogMatch`` condition.
946
-
947
- This limit is not implemented for alert policies that are
948
- not log-based.
945
+ Required for log-based alerting policies, i.e. policies with
946
+ a ``LogMatch`` condition.
947
+
948
+ This limit is not implemented for alerting policies that do
949
+ not have a LogMatch condition.
950
+ notification_prompts (MutableSequence[google.cloud.monitoring_v3.types.AlertPolicy.AlertStrategy.NotificationPrompt]):
951
+ For log-based alert policies, the notification prompts is
952
+ always [OPENED]. For non log-based alert policies, the
953
+ notification prompts can be [OPENED] or [OPENED, CLOSED].
949
954
auto_close (google.protobuf.duration_pb2.Duration):
950
- If an alert policy that was active has no
955
+ If an alerting policy that was active has no
951
956
data for this long, any open incidents will
952
957
close
953
958
notification_channel_strategy (MutableSequence[google.cloud.monitoring_v3.types.AlertPolicy.AlertStrategy.NotificationChannelStrategy]):
954
959
Control how notifications will be sent out,
955
960
on a per-channel basis.
956
961
"""
957
962
963
+ class NotificationPrompt (proto .Enum ):
964
+ r"""Control when notifications will be sent out.
965
+
966
+ Values:
967
+ NOTIFICATION_PROMPT_UNSPECIFIED (0):
968
+ No strategy specified. Treated as error.
969
+ OPENED (1):
970
+ Notify when an incident is opened.
971
+ CLOSED (3):
972
+ Notify when an incident is closed.
973
+ """
974
+ NOTIFICATION_PROMPT_UNSPECIFIED = 0
975
+ OPENED = 1
976
+ CLOSED = 3
977
+
958
978
class NotificationRateLimit (proto .Message ):
959
- r"""Control over the rate of notifications sent to this alert
979
+ r"""Control over the rate of notifications sent to this alerting
960
980
policy's notification channels.
961
981
962
982
Attributes:
@@ -1008,6 +1028,13 @@ class NotificationChannelStrategy(proto.Message):
1008
1028
message = "AlertPolicy.AlertStrategy.NotificationRateLimit" ,
1009
1029
)
1010
1030
)
1031
+ notification_prompts : MutableSequence [
1032
+ "AlertPolicy.AlertStrategy.NotificationPrompt"
1033
+ ] = proto .RepeatedField (
1034
+ proto .ENUM ,
1035
+ number = 2 ,
1036
+ enum = "AlertPolicy.AlertStrategy.NotificationPrompt" ,
1037
+ )
1011
1038
auto_close : duration_pb2 .Duration = proto .Field (
1012
1039
proto .MESSAGE ,
1013
1040
number = 3 ,
0 commit comments