Package com.google.monitoring.v3
Class AlertPolicy.Condition
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.monitoring.v3.AlertPolicy.Condition
- All Implemented Interfaces:
AlertPolicy.ConditionOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
- Enclosing class:
- AlertPolicy
public static final class AlertPolicy.Condition
extends com.google.protobuf.GeneratedMessage
implements AlertPolicy.ConditionOrBuilder
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.Protobuf type
google.monitoring.v3.AlertPolicy.Condition- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA condition is a true/false test that determines when an alerting policy should open an incident.static enumstatic enumA condition control that determines how metric-threshold conditions are evaluated when data stops arriving.static final classA condition type that checks whether a log message in the [scoping project](https://cloud.google.com/monitoring/api/v3#project_name) satisfies the given filter.static interfacestatic final classA condition type that checks that monitored resources are reporting data.static interfacestatic final classA condition type that compares a collection of time series against a threshold.static interfacestatic final classA condition type that allows alerting policies to be defined using [Monitoring Query Language](https://cloud.google.com/monitoring/mql).static interfacestatic final classA condition type that allows alerting policies to be defined using [Prometheus Query Language (PromQL)](https://prometheus.io/docs/prometheus/latest/querying/basics/).static interfacestatic final classA condition that allows alerting policies to be defined using GoogleSQL.static interfacestatic final classSpecifies how many time series must fail a predicate to trigger a condition.static interfaceNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanA condition that checks that a time series continues to receive new data points.A condition that checks that a time series continues to receive new data points.A condition that checks for log messages matching given constraints.A condition that checks for log messages matching given constraints.A condition that uses the Monitoring Query Language to define alerts.A condition that uses the Monitoring Query Language to define alerts.A condition that uses the Prometheus query language to define alerts.A condition that uses the Prometheus query language to define alerts.A condition that periodically evaluates a SQL query result.A condition that periodically evaluates a SQL query result.A condition that compares a time series against a threshold.A condition that compares a time series against a threshold.static AlertPolicy.Conditionstatic final com.google.protobuf.Descriptors.DescriptorA short name or phrase used to identify the condition in dashboards, notifications, and incidents.com.google.protobuf.ByteStringA short name or phrase used to identify the condition in dashboards, notifications, and incidents.getName()Required if the condition exists.com.google.protobuf.ByteStringRequired if the condition exists.com.google.protobuf.Parser<AlertPolicy.Condition>intbooleanA condition that checks that a time series continues to receive new data points.booleanA condition that checks for log messages matching given constraints.booleanA condition that uses the Monitoring Query Language to define alerts.booleanA condition that uses the Prometheus query language to define alerts.booleanA condition that periodically evaluates a SQL query result.booleanA condition that compares a time series against a threshold.inthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleannewBuilder(AlertPolicy.Condition prototype) protected AlertPolicy.Condition.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static AlertPolicy.ConditionparseDelimitedFrom(InputStream input) static AlertPolicy.ConditionparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AlertPolicy.ConditionparseFrom(byte[] data) static AlertPolicy.ConditionparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AlertPolicy.ConditionparseFrom(com.google.protobuf.ByteString data) static AlertPolicy.ConditionparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AlertPolicy.ConditionparseFrom(com.google.protobuf.CodedInputStream input) static AlertPolicy.ConditionparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AlertPolicy.ConditionparseFrom(InputStream input) static AlertPolicy.ConditionparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AlertPolicy.ConditionparseFrom(ByteBuffer data) static AlertPolicy.ConditionparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<AlertPolicy.Condition>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER- See Also:
-
CONDITION_THRESHOLD_FIELD_NUMBER
public static final int CONDITION_THRESHOLD_FIELD_NUMBER- See Also:
-
CONDITION_ABSENT_FIELD_NUMBER
public static final int CONDITION_ABSENT_FIELD_NUMBER- See Also:
-
CONDITION_MATCHED_LOG_FIELD_NUMBER
public static final int CONDITION_MATCHED_LOG_FIELD_NUMBER- See Also:
-
CONDITION_MONITORING_QUERY_LANGUAGE_FIELD_NUMBER
public static final int CONDITION_MONITORING_QUERY_LANGUAGE_FIELD_NUMBER- See Also:
-
CONDITION_PROMETHEUS_QUERY_LANGUAGE_FIELD_NUMBER
public static final int CONDITION_PROMETHEUS_QUERY_LANGUAGE_FIELD_NUMBER- See Also:
-
CONDITION_SQL_FIELD_NUMBER
public static final int CONDITION_SQL_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getConditionCase
- Specified by:
getConditionCasein interfaceAlertPolicy.ConditionOrBuilder
-
getName
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.
string name = 12;- Specified by:
getNamein interfaceAlertPolicy.ConditionOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()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.
string name = 12;- Specified by:
getNameBytesin interfaceAlertPolicy.ConditionOrBuilder- Returns:
- The bytes for name.
-
getDisplayName
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.
string display_name = 6;- Specified by:
getDisplayNamein interfaceAlertPolicy.ConditionOrBuilder- Returns:
- The displayName.
-
getDisplayNameBytes
public com.google.protobuf.ByteString getDisplayNameBytes()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.
string display_name = 6;- Specified by:
getDisplayNameBytesin interfaceAlertPolicy.ConditionOrBuilder- Returns:
- The bytes for displayName.
-
hasConditionThreshold
public boolean hasConditionThreshold()A condition that compares a time series against a threshold.
.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;- Specified by:
hasConditionThresholdin interfaceAlertPolicy.ConditionOrBuilder- Returns:
- Whether the conditionThreshold field is set.
-
getConditionThreshold
A condition that compares a time series against a threshold.
.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;- Specified by:
getConditionThresholdin interfaceAlertPolicy.ConditionOrBuilder- Returns:
- The conditionThreshold.
-
getConditionThresholdOrBuilder
A condition that compares a time series against a threshold.
.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;- Specified by:
getConditionThresholdOrBuilderin interfaceAlertPolicy.ConditionOrBuilder
-
hasConditionAbsent
public boolean hasConditionAbsent()A condition that checks that a time series continues to receive new data points.
.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;- Specified by:
hasConditionAbsentin interfaceAlertPolicy.ConditionOrBuilder- Returns:
- Whether the conditionAbsent field is set.
-
getConditionAbsent
A condition that checks that a time series continues to receive new data points.
.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;- Specified by:
getConditionAbsentin interfaceAlertPolicy.ConditionOrBuilder- Returns:
- The conditionAbsent.
-
getConditionAbsentOrBuilder
A condition that checks that a time series continues to receive new data points.
.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;- Specified by:
getConditionAbsentOrBuilderin interfaceAlertPolicy.ConditionOrBuilder
-
hasConditionMatchedLog
public boolean hasConditionMatchedLog()A condition that checks for log messages matching given constraints. If set, no other conditions can be present.
.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;- Specified by:
hasConditionMatchedLogin interfaceAlertPolicy.ConditionOrBuilder- Returns:
- Whether the conditionMatchedLog field is set.
-
getConditionMatchedLog
A condition that checks for log messages matching given constraints. If set, no other conditions can be present.
.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;- Specified by:
getConditionMatchedLogin interfaceAlertPolicy.ConditionOrBuilder- Returns:
- The conditionMatchedLog.
-
getConditionMatchedLogOrBuilder
A condition that checks for log messages matching given constraints. If set, no other conditions can be present.
.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;- Specified by:
getConditionMatchedLogOrBuilderin interfaceAlertPolicy.ConditionOrBuilder
-
hasConditionMonitoringQueryLanguage
public boolean hasConditionMonitoringQueryLanguage()A condition that uses the Monitoring Query Language to define alerts.
.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;- Specified by:
hasConditionMonitoringQueryLanguagein interfaceAlertPolicy.ConditionOrBuilder- Returns:
- Whether the conditionMonitoringQueryLanguage field is set.
-
getConditionMonitoringQueryLanguage
A condition that uses the Monitoring Query Language to define alerts.
.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;- Specified by:
getConditionMonitoringQueryLanguagein interfaceAlertPolicy.ConditionOrBuilder- Returns:
- The conditionMonitoringQueryLanguage.
-
getConditionMonitoringQueryLanguageOrBuilder
public AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder getConditionMonitoringQueryLanguageOrBuilder()A condition that uses the Monitoring Query Language to define alerts.
.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;- Specified by:
getConditionMonitoringQueryLanguageOrBuilderin interfaceAlertPolicy.ConditionOrBuilder
-
hasConditionPrometheusQueryLanguage
public boolean hasConditionPrometheusQueryLanguage()A condition that uses the Prometheus query language to define alerts.
.google.monitoring.v3.AlertPolicy.Condition.PrometheusQueryLanguageCondition condition_prometheus_query_language = 21;- Specified by:
hasConditionPrometheusQueryLanguagein interfaceAlertPolicy.ConditionOrBuilder- Returns:
- Whether the conditionPrometheusQueryLanguage field is set.
-
getConditionPrometheusQueryLanguage
A condition that uses the Prometheus query language to define alerts.
.google.monitoring.v3.AlertPolicy.Condition.PrometheusQueryLanguageCondition condition_prometheus_query_language = 21;- Specified by:
getConditionPrometheusQueryLanguagein interfaceAlertPolicy.ConditionOrBuilder- Returns:
- The conditionPrometheusQueryLanguage.
-
getConditionPrometheusQueryLanguageOrBuilder
public AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilder getConditionPrometheusQueryLanguageOrBuilder()A condition that uses the Prometheus query language to define alerts.
.google.monitoring.v3.AlertPolicy.Condition.PrometheusQueryLanguageCondition condition_prometheus_query_language = 21;- Specified by:
getConditionPrometheusQueryLanguageOrBuilderin interfaceAlertPolicy.ConditionOrBuilder
-
hasConditionSql
public boolean hasConditionSql()A condition that periodically evaluates a SQL query result.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition condition_sql = 22;- Specified by:
hasConditionSqlin interfaceAlertPolicy.ConditionOrBuilder- Returns:
- Whether the conditionSql field is set.
-
getConditionSql
A condition that periodically evaluates a SQL query result.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition condition_sql = 22;- Specified by:
getConditionSqlin interfaceAlertPolicy.ConditionOrBuilder- Returns:
- The conditionSql.
-
getConditionSqlOrBuilder
A condition that periodically evaluates a SQL query result.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition condition_sql = 22;- Specified by:
getConditionSqlOrBuilderin interfaceAlertPolicy.ConditionOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static AlertPolicy.Condition parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static AlertPolicy.Condition parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static AlertPolicy.Condition parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static AlertPolicy.Condition parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static AlertPolicy.Condition parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static AlertPolicy.Condition parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static AlertPolicy.Condition parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static AlertPolicy.Condition parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static AlertPolicy.Condition parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static AlertPolicy.Condition parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected AlertPolicy.Condition.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-