Cloud Monitoring V3 API - Class Google::Cloud::Monitoring::V3::AlertPolicy::Condition (v0.8.0)

Reference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::AlertPolicy::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.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#condition_absent

def condition_absent() -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::MetricAbsence
Returns

#condition_absent=

def condition_absent=(value) -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::MetricAbsence
Parameter
Returns

#condition_matched_log

def condition_matched_log() -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::LogMatch
Returns

#condition_matched_log=

def condition_matched_log=(value) -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::LogMatch
Parameter
Returns

#condition_monitoring_query_language

def condition_monitoring_query_language() -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::MonitoringQueryLanguageCondition
Returns

#condition_monitoring_query_language=

def condition_monitoring_query_language=(value) -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::MonitoringQueryLanguageCondition
Parameter
Returns

#condition_threshold

def condition_threshold() -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::MetricThreshold
Returns

#condition_threshold=

def condition_threshold=(value) -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::MetricThreshold
Parameter
Returns

#display_name

def display_name() -> ::String
Returns
  • (::String) — A short name or phrase used to identify the condition in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple conditions in the same policy.

#display_name=

def display_name=(value) -> ::String
Parameter
  • value (::String) — A short name or phrase used to identify the condition in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple conditions in the same policy.
Returns
  • (::String) — A short name or phrase used to identify the condition in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple conditions in the same policy.

#name

def name() -> ::String
Returns
  • (::String) — Required if the condition exists. The unique resource name for this condition. Its format is:

    projects/[PROJECT_ID_OR_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 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 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.

#name=

def name=(value) -> ::String
Parameter
  • value (::String) — Required if the condition exists. The unique resource name for this condition. Its format is:

    projects/[PROJECT_ID_OR_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 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 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.

Returns
  • (::String) — Required if the condition exists. The unique resource name for this condition. Its format is:

    projects/[PROJECT_ID_OR_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 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 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.