@@ -34,7 +34,7 @@ option ruby_package = "Google::Cloud::Monitoring::V3";
3434
3535// A description of the conditions under which some aspect of your system is
3636// considered to be "unhealthy" and the ways to notify people or services about
37- // this state. For an overview of alert policies, see
37+ // this state. For an overview of alerting policies, see
3838// [Introduction to Alerting](https://cloud.google.com/monitoring/alerts/).
3939//
4040message AlertPolicy {
@@ -67,7 +67,7 @@ message AlertPolicy {
6767 // The content may not exceed 8,192 Unicode characters and may not exceed
6868 // more than 10,240 bytes when encoded in UTF-8 format, whichever is
6969 // smaller. This text can be [templatized by using
70- // variables](https://cloud.google.com/monitoring/alerts/doc-variables).
70+ // variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars ).
7171 string content = 1 ;
7272
7373 // The format of the `content` field. Presently, only the value
@@ -85,7 +85,7 @@ message AlertPolicy {
8585 // it is common to define textual fields in databases as VARCHAR(255).
8686 //
8787 // The contents of the subject line can be [templatized by using
88- // variables](https://cloud.google.com/monitoring/alerts/doc-variables).
88+ // variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars ).
8989 // If this field is missing or empty, a default subject line will be
9090 // generated.
9191 string subject = 3 [(google.api.field_behavior ) = OPTIONAL ];
@@ -323,7 +323,7 @@ message AlertPolicy {
323323 map <string , string > label_extractors = 2 ;
324324 }
325325
326- // A condition type that allows alert policies to be defined using
326+ // A condition type that allows alerting policies to be defined using
327327 // [Monitoring Query Language](https://cloud.google.com/monitoring/mql).
328328 message MonitoringQueryLanguageCondition {
329329 // [Monitoring Query Language](https://cloud.google.com/monitoring/mql)
@@ -355,7 +355,7 @@ message AlertPolicy {
355355 EvaluationMissingData evaluation_missing_data = 4 ;
356356 }
357357
358- // A condition type that allows alert policies to be defined using
358+ // A condition type that allows alerting policies to be defined using
359359 // [Prometheus Query Language
360360 // (PromQL)](https://prometheus.io/docs/prometheus/latest/querying/basics/).
361361 //
@@ -414,7 +414,7 @@ message AlertPolicy {
414414 // Label names [must be
415415 // valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
416416 // Label values can be [templatized by using
417- // variables](https://cloud.google.com/monitoring/alerts/doc-variables).
417+ // variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars ).
418418 // The only available variable names are the names of the labels in the
419419 // PromQL result, including "__name__" and "value". "labels" may be empty.
420420 map <string , string > labels = 4 [(google.api.field_behavior ) = OPTIONAL ];
@@ -527,13 +527,25 @@ message AlertPolicy {
527527 // Control over how the notification channels in `notification_channels`
528528 // are notified when this alert fires.
529529 message AlertStrategy {
530- // Control over the rate of notifications sent to this alert policy's
530+ // Control over the rate of notifications sent to this alerting policy's
531531 // notification channels.
532532 message NotificationRateLimit {
533533 // Not more than one notification per `period`.
534534 google.protobuf.Duration period = 1 ;
535535 }
536536
537+ // Control when notifications will be sent out.
538+ enum NotificationPrompt {
539+ // No strategy specified. Treated as error.
540+ NOTIFICATION_PROMPT_UNSPECIFIED = 0 ;
541+
542+ // Notify when an incident is opened.
543+ OPENED = 1 ;
544+
545+ // Notify when an incident is closed.
546+ CLOSED = 3 ;
547+ }
548+
537549 // Control over how the notification channels in `notification_channels`
538550 // are notified when this alert fires, on a per-channel basis.
539551 message NotificationChannelStrategy {
@@ -551,20 +563,27 @@ message AlertPolicy {
551563 google.protobuf.Duration renotify_interval = 2 ;
552564 }
553565
554- // Required for alert policies with a `LogMatch` condition.
566+ // Required for log-based alerting policies, i.e. policies with a `LogMatch`
567+ // condition.
555568 //
556- // This limit is not implemented for alert policies that are not log-based.
569+ // This limit is not implemented for alerting policies that do not have
570+ // a LogMatch condition.
557571 NotificationRateLimit notification_rate_limit = 1 ;
558572
559- // If an alert policy that was active has no data for this long, any open
573+ // For log-based alert policies, the notification prompts is always
574+ // [OPENED]. For non log-based alert policies, the notification prompts can
575+ // be [OPENED] or [OPENED, CLOSED].
576+ repeated NotificationPrompt notification_prompts = 2 ;
577+
578+ // If an alerting policy that was active has no data for this long, any open
560579 // incidents will close
561580 google.protobuf.Duration auto_close = 3 ;
562581
563582 // Control how notifications will be sent out, on a per-channel basis.
564583 repeated NotificationChannelStrategy notification_channel_strategy = 4 ;
565584 }
566585
567- // An enumeration of possible severity level for an Alert Policy .
586+ // An enumeration of possible severity level for an alerting policy .
568587 enum Severity {
569588 // No severity is specified. This is the default value.
570589 SEVERITY_UNSPECIFIED = 0 ;
@@ -583,8 +602,8 @@ message AlertPolicy {
583602 WARNING = 3 ;
584603 }
585604
586- // Required if the policy exists. The resource name for this policy. The
587- // format is:
605+ // Identifier. Required if the policy exists. The resource name for this
606+ // policy. The format is:
588607 //
589608 // projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
590609 //
@@ -593,7 +612,7 @@ message AlertPolicy {
593612 // [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
594613 // method, do not include the `name` field in the alerting policy passed as
595614 // part of the request.
596- string name = 1 ;
615+ string name = 1 [ (google.api .field_behavior ) = IDENTIFIER ] ;
597616
598617 // A short name or phrase used to identify the policy in dashboards,
599618 // notifications, and incidents. To avoid confusion, don't use the same
@@ -653,9 +672,9 @@ message AlertPolicy {
653672 // a field projection has been specified that strips it out.
654673 google.protobuf.BoolValue enabled = 17 ;
655674
656- // Read-only description of how the alert policy is invalid. This field is
657- // only set when the alert policy is invalid. An invalid alert policy will not
658- // generate incidents.
675+ // Read-only description of how the alerting policy is invalid. This field is
676+ // only set when the alerting policy is invalid. An invalid alerting policy
677+ // will not generate incidents.
659678 google.rpc.Status validity = 18 ;
660679
661680 // Identifies the notification channels to which notifications should be sent
@@ -678,11 +697,11 @@ message AlertPolicy {
678697 // provided in a call to create or update, this field will be ignored.
679698 MutationRecord mutation_record = 11 ;
680699
681- // Control over how this alert policy's notification channels are notified.
700+ // Control over how this alerting policy's notification channels are notified.
682701 AlertStrategy alert_strategy = 21 ;
683702
684- // Optional. The severity of an alert policy indicates how important incidents
685- // generated by that policy are. The severity level will be displayed on the
686- // Incident detail page and in notifications.
703+ // Optional. The severity of an alerting policy indicates how important
704+ // incidents generated by that policy are. The severity level will be
705+ // displayed on the Incident detail page and in notifications.
687706 Severity severity = 22 [(google.api.field_behavior ) = OPTIONAL ];
688707}
0 commit comments