Class AlertPolicy (0.35.0)

A description of the conditions under which some aspect of your system is considered to be "unhealthy" and the ways to notify people or services about this state. For an overview of alert policies, see Introduction to Alerting <https://cloud.google.com/monitoring/alerts/>__. .. attribute:: name

Required if the policy exists. The resource name for this policy. The format is: :: projects/[PROJECT_ID_OR_NUMBER ]/alertPolicies/[ALERT_POLICY_ID] [ALERT_POLICY_ID] is assigned by Stackdriver Monitoring when the policy is created. When calling the [alertPolicies.create][google.monitoring.v3.A lertPolicyService.CreateAlertPolicy] method, do not include the name field in the alerting policy passed as part of the request.

Documentation that is included with notifications and incidents related to this policy. Best practice is for the documentation to include information to help responders understand, mitigate, escalate, and correct the underlying problems detected by the alerting policy. Notification channels that have limited capacity might not show this documentation.

A list of conditions for the policy. The conditions are combined by AND or OR according to the combiner field. If the combined conditions evaluate to true, then an incident is created. A policy can have from one to six conditions. If condition_time_series_query_language is present, it must be the only condition.

Whether or not the policy is enabled. On write, the default interpretation if unset is that the policy is enabled. On read, clients should not make any assumption about the state if it has not been populated. The field should always be populated on List and Get operations, unless a field projection has been specified that strips it out.

Identifies the notification channels to which notifications should be sent when incidents are opened or closed or when new violations occur on an already opened incident. Each element of this array corresponds to the name field in each of the [NotificationChannel][google.monitoring.v3.NotificationCha nnel] objects that are returned from the [ListNotificationCh annels][google.monitoring.v3.NotificationChannelService.List NotificationChannels] method. The format of the entries in this field is: :: projects/[PROJECT_ID_OR_NUMBER]/notifi cationChannels/[CHANNEL_ID]

A read-only record of the most recent change to the alerting policy. If provided in a call to create or update, this field will be ignored.

Classes

Condition

A condition is a true/false test that determines when an alerting policy should open an incident. If a condition evaluates to true, it signifies that something is wrong. .. attribute:: name

Required if the condition exists. The unique resource name for this condition. Its format is: :: projects/[PROJECT_ID_O R_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] [CONDITION_ID] is assigned by Stackdriver Monitoring when the condition is created as part of a new or updated alerting policy. When calling the [alertPolicies.create][google.monito ring.v3.AlertPolicyService.CreateAlertPolicy] method, do not include the name field in the conditions of the requested alerting policy. Stackdriver Monitoring creates the condition identifiers and includes them in the new policy. When calling the [alertPolicies.update][google.monitoring.v3.AlertPolicySer vice.UpdateAlertPolicy] method to update a policy, including a condition name causes the existing condition to be updated. Conditions without names are added to the updated policy. Existing conditions are deleted if they are not updated. Best practice is to preserve [CONDITION_ID] if you make only small changes, such as those to condition thresholds, durations, or trigger values. Otherwise, treat the change as a new condition and let the existing condition be deleted.

Only one of the following condition types will be specified.

A condition that checks that a time series continues to receive new data points.

Documentation

A content string and a MIME type that describes the content string's format. .. attribute:: content

The text of the documentation, interpreted according to mime_type. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller.

UserLabelsEntry

API documentation for monitoring_v3.types.AlertPolicy.UserLabelsEntry class.