public sealed class AlertPolicy.Types.Condition : IMessage<AlertPolicy.Types.Condition>, IEquatable<AlertPolicy.Types.Condition>, IDeepCloneable<AlertPolicy.Types.Condition>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Monitoring v3 API class AlertPolicy.Types.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.
Implements
IMessageAlertPolicyTypesCondition, IEquatableAlertPolicyTypesCondition, IDeepCloneableAlertPolicyTypesCondition, IBufferMessage, IMessageNamespace
Google.Cloud.Monitoring.V3Assembly
Google.Cloud.Monitoring.V3.dll
Constructors
Condition()
public Condition()
Condition(Condition)
public Condition(AlertPolicy.Types.Condition other)
Parameter | |
---|---|
Name | Description |
other |
AlertPolicyTypesCondition |
Properties
ConditionAbsent
public AlertPolicy.Types.Condition.Types.MetricAbsence ConditionAbsent { get; set; }
A condition that checks that a time series continues to receive new data points.
Property Value | |
---|---|
Type | Description |
AlertPolicyTypesConditionTypesMetricAbsence |
ConditionCase
public AlertPolicy.Types.Condition.ConditionOneofCase ConditionCase { get; }
Property Value | |
---|---|
Type | Description |
AlertPolicyTypesConditionConditionOneofCase |
ConditionMatchedLog
public AlertPolicy.Types.Condition.Types.LogMatch ConditionMatchedLog { get; set; }
A condition that checks for log messages matching given constraints. If set, no other conditions can be present.
Property Value | |
---|---|
Type | Description |
AlertPolicyTypesConditionTypesLogMatch |
ConditionMonitoringQueryLanguage
public AlertPolicy.Types.Condition.Types.MonitoringQueryLanguageCondition ConditionMonitoringQueryLanguage { get; set; }
A condition that uses the Monitoring Query Language to define alerts.
Property Value | |
---|---|
Type | Description |
AlertPolicyTypesConditionTypesMonitoringQueryLanguageCondition |
ConditionPrometheusQueryLanguage
public AlertPolicy.Types.Condition.Types.PrometheusQueryLanguageCondition ConditionPrometheusQueryLanguage { get; set; }
A condition that uses the Prometheus query language to define alerts.
Property Value | |
---|---|
Type | Description |
AlertPolicyTypesConditionTypesPrometheusQueryLanguageCondition |
ConditionThreshold
public AlertPolicy.Types.Condition.Types.MetricThreshold ConditionThreshold { get; set; }
A condition that compares a time series against a threshold.
Property Value | |
---|---|
Type | Description |
AlertPolicyTypesConditionTypesMetricThreshold |
DisplayName
public string DisplayName { get; set; }
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.
Property Value | |
---|---|
Type | Description |
string |
Name
public string Name { get; set; }
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 Cloud Monitoring when the
condition is created as part of a new or updated alerting policy.
When calling the
[alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
method, do not include the name
field in the conditions of the
requested alerting policy. Cloud Monitoring creates the
condition identifiers and includes them in the new policy.
When calling the
[alertPolicies.update][google.monitoring.v3.AlertPolicyService.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.
Property Value | |
---|---|
Type | Description |
string |