- 3.55.0 (latest)
- 3.54.0
- 3.53.0
- 3.52.0
- 3.50.0
- 3.49.0
- 3.48.0
- 3.47.0
- 3.46.0
- 3.45.0
- 3.44.0
- 3.43.0
- 3.42.0
- 3.41.0
- 3.40.0
- 3.38.0
- 3.37.0
- 3.36.0
- 3.35.0
- 3.34.0
- 3.33.0
- 3.32.0
- 3.31.0
- 3.30.0
- 3.29.0
- 3.28.0
- 3.25.0
- 3.24.0
- 3.23.0
- 3.22.0
- 3.21.0
- 3.20.0
- 3.19.0
- 3.18.0
- 3.17.0
- 3.16.0
- 3.15.0
- 3.14.0
- 3.13.0
- 3.12.0
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.6
- 3.3.6
- 3.2.10
public static interface AlertPolicy.Condition.PrometheusQueryLanguageConditionOrBuilder extends MessageOrBuilder
Implements
MessageOrBuilderMethods
containsLabels(String key)
public abstract boolean containsLabels(String key)
Optional. Labels to add to or overwrite in the PromQL query result. Label names must be valid. Label values can be templatized by using variables. The only available variable names are the names of the labels in the PromQL result, including "name" and "value". "labels" may be empty.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
key |
String |
Returns | |
---|---|
Type | Description |
boolean |
getAlertRule()
public abstract String getAlertRule()
Optional. The alerting rule name of this alert in the corresponding Prometheus configuration file.
Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future.
This field is optional. If this field is not empty, then it must be a valid Prometheus label name. This field may not exceed 2048 Unicode characters in length.
string alert_rule = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
String |
The alertRule. |
getAlertRuleBytes()
public abstract ByteString getAlertRuleBytes()
Optional. The alerting rule name of this alert in the corresponding Prometheus configuration file.
Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future.
This field is optional. If this field is not empty, then it must be a valid Prometheus label name. This field may not exceed 2048 Unicode characters in length.
string alert_rule = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for alertRule. |
getDuration()
public abstract Duration getDuration()
Optional. Alerts are considered firing once their PromQL expression was evaluated to be "true" for this long. Alerts whose PromQL expression was not evaluated to be "true" for long enough are considered pending. Must be a non-negative duration or missing. This field is optional. Its default value is zero.
.google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
Duration |
The duration. |
getDurationOrBuilder()
public abstract DurationOrBuilder getDurationOrBuilder()
Optional. Alerts are considered firing once their PromQL expression was evaluated to be "true" for this long. Alerts whose PromQL expression was not evaluated to be "true" for long enough are considered pending. Must be a non-negative duration or missing. This field is optional. Its default value is zero.
.google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
DurationOrBuilder |
getEvaluationInterval()
public abstract Duration getEvaluationInterval()
Optional. How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. This field is optional. Its default value is 30 seconds. If this PrometheusQueryLanguageCondition was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.
.google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
Duration |
The evaluationInterval. |
getEvaluationIntervalOrBuilder()
public abstract DurationOrBuilder getEvaluationIntervalOrBuilder()
Optional. How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. This field is optional. Its default value is 30 seconds. If this PrometheusQueryLanguageCondition was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.
.google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
DurationOrBuilder |
getLabels() (deprecated)
public abstract Map<String,String> getLabels()
Use #getLabelsMap() instead.
Returns | |
---|---|
Type | Description |
Map<String,String> |
getLabelsCount()
public abstract int getLabelsCount()
Optional. Labels to add to or overwrite in the PromQL query result. Label names must be valid. Label values can be templatized by using variables. The only available variable names are the names of the labels in the PromQL result, including "name" and "value". "labels" may be empty.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
int |
getLabelsMap()
public abstract Map<String,String> getLabelsMap()
Optional. Labels to add to or overwrite in the PromQL query result. Label names must be valid. Label values can be templatized by using variables. The only available variable names are the names of the labels in the PromQL result, including "name" and "value". "labels" may be empty.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
Map<String,String> |
getLabelsOrDefault(String key, String defaultValue)
public abstract String getLabelsOrDefault(String key, String defaultValue)
Optional. Labels to add to or overwrite in the PromQL query result. Label names must be valid. Label values can be templatized by using variables. The only available variable names are the names of the labels in the PromQL result, including "name" and "value". "labels" may be empty.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameters | |
---|---|
Name | Description |
key |
String |
defaultValue |
String |
Returns | |
---|---|
Type | Description |
String |
getLabelsOrThrow(String key)
public abstract String getLabelsOrThrow(String key)
Optional. Labels to add to or overwrite in the PromQL query result. Label names must be valid. Label values can be templatized by using variables. The only available variable names are the names of the labels in the PromQL result, including "name" and "value". "labels" may be empty.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
key |
String |
Returns | |
---|---|
Type | Description |
String |
getQuery()
public abstract String getQuery()
Required. The PromQL expression to evaluate. Every evaluation cycle this expression is evaluated at the current time, and all resultant time series become pending/firing alerts. This field must not be empty.
string query = 1 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
String |
The query. |
getQueryBytes()
public abstract ByteString getQueryBytes()
Required. The PromQL expression to evaluate. Every evaluation cycle this expression is evaluated at the current time, and all resultant time series become pending/firing alerts. This field must not be empty.
string query = 1 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for query. |
getRuleGroup()
public abstract String getRuleGroup()
Optional. The rule group name of this alert in the corresponding Prometheus configuration file.
Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future.
This field is optional. If this field is not empty, then it must contain a valid UTF-8 string. This field may not exceed 2048 Unicode characters in length.
string rule_group = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
String |
The ruleGroup. |
getRuleGroupBytes()
public abstract ByteString getRuleGroupBytes()
Optional. The rule group name of this alert in the corresponding Prometheus configuration file.
Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future.
This field is optional. If this field is not empty, then it must contain a valid UTF-8 string. This field may not exceed 2048 Unicode characters in length.
string rule_group = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for ruleGroup. |
hasDuration()
public abstract boolean hasDuration()
Optional. Alerts are considered firing once their PromQL expression was evaluated to be "true" for this long. Alerts whose PromQL expression was not evaluated to be "true" for long enough are considered pending. Must be a non-negative duration or missing. This field is optional. Its default value is zero.
.google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
boolean |
Whether the duration field is set. |
hasEvaluationInterval()
public abstract boolean hasEvaluationInterval()
Optional. How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. This field is optional. Its default value is 30 seconds. If this PrometheusQueryLanguageCondition was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.
.google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
boolean |
Whether the evaluationInterval field is set. |