AlertPolicyConditionConditionPrometheusQueryLanguageArgs

data class AlertPolicyConditionConditionPrometheusQueryLanguageArgs(val alertRule: Output<String>? = null, val disableMetricValidation: Output<Boolean>? = null, val duration: Output<String>? = null, val evaluationInterval: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val query: Output<String>, val ruleGroup: Output<String>? = null) : ConvertibleToJava<AlertPolicyConditionConditionPrometheusQueryLanguageArgs>

Constructors

constructor(alertRule: Output<String>? = null, disableMetricValidation: Output<Boolean>? = null, duration: Output<String>? = null, evaluationInterval: Output<String>? = null, labels: Output<Map<String, String>>? = null, query: Output<String>, ruleGroup: Output<String>? = null)

Properties

Link copied to clipboard
val alertRule: Output<String>? = null

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.

Link copied to clipboard
val disableMetricValidation: Output<Boolean>? = null
Link copied to clipboard
val duration: Output<String>? = null

Alerts are considered firing once their PromQL expression evaluated to be "true" for this long. Alerts whose PromQL expression was not evaluated to be "true" for long enough are considered pending. The default value is zero. Must be zero or positive.

Link copied to clipboard
val evaluationInterval: Output<String>? = null

How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. The 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.

Link copied to clipboard
val labels: Output<Map<String, String>>? = null

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, although label names beginning with \_\_ (two "\_") are reserved for internal use. "labels" may be empty. This field is intended to be used for organizing and identifying the AlertPolicy.

Link copied to clipboard
val query: Output<String>

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.

Link copied to clipboard
val ruleGroup: Output<String>? = null

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.

Functions

Link copied to clipboard
open override fun toJava(): AlertPolicyConditionConditionPrometheusQueryLanguageArgs