Class Rule
- java.lang.Object
-
- io.fabric8.openshift.api.model.monitoring.v1.Rule
-
- All Implemented Interfaces:
Editable<RuleBuilder>,KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class Rule extends Object implements Editable<RuleBuilder>, KubernetesResource
Rule describes an alerting or recording rule See Prometheus documentation: [alerting](https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) or [recording](https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules) rule- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RuleBuilderedit()Map<String,Object>getAdditionalProperties()StringgetAlert()alert defines the name of the alert.Map<String,String>getAnnotations()annotations defines annotations to add to each alert.IntOrStringgetExpr()Rule describes an alerting or recording rule See Prometheus documentation: [alerting](https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) or [recording](https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules) ruleStringgetFor()for defines how alerts are considered firing once they have been returned for this long.StringgetKeepFiringFor()keep_firing_for defines how long an alert will continue firing after the condition that triggered it has cleared.Map<String,String>getLabels()labels defines labels to add or overwrite.StringgetRecord()record defines the name of the time series to output to.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetAlert(String alert)alert defines the name of the alert.voidsetAnnotations(Map<String,String> annotations)annotations defines annotations to add to each alert.voidsetExpr(IntOrString expr)Rule describes an alerting or recording rule See Prometheus documentation: [alerting](https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) or [recording](https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules) rulevoidsetFor(String _for)for defines how alerts are considered firing once they have been returned for this long.voidsetKeepFiringFor(String keepFiringFor)keep_firing_for defines how long an alert will continue firing after the condition that triggered it has cleared.voidsetLabels(Map<String,String> labels)labels defines labels to add or overwrite.voidsetRecord(String record)record defines the name of the time series to output to.RuleBuildertoBuilder()
-
-
-
Method Detail
-
getAlert
public String getAlert()
alert defines the name of the alert. Must be a valid label value. Only one of `record` and `alert` must be set.
-
setAlert
public void setAlert(String alert)
alert defines the name of the alert. Must be a valid label value. Only one of `record` and `alert` must be set.
-
getAnnotations
public Map<String,String> getAnnotations()
annotations defines annotations to add to each alert. Only valid for alerting rules.
-
setAnnotations
public void setAnnotations(Map<String,String> annotations)
annotations defines annotations to add to each alert. Only valid for alerting rules.
-
getExpr
public IntOrString getExpr()
Rule describes an alerting or recording rule See Prometheus documentation: [alerting](https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) or [recording](https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules) rule
-
setExpr
public void setExpr(IntOrString expr)
Rule describes an alerting or recording rule See Prometheus documentation: [alerting](https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) or [recording](https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules) rule
-
getFor
public String getFor()
for defines how alerts are considered firing once they have been returned for this long.
-
setFor
public void setFor(String _for)
for defines how alerts are considered firing once they have been returned for this long.
-
getKeepFiringFor
public String getKeepFiringFor()
keep_firing_for defines how long an alert will continue firing after the condition that triggered it has cleared.
-
setKeepFiringFor
public void setKeepFiringFor(String keepFiringFor)
keep_firing_for defines how long an alert will continue firing after the condition that triggered it has cleared.
-
setLabels
public void setLabels(Map<String,String> labels)
labels defines labels to add or overwrite.
-
getRecord
public String getRecord()
record defines the name of the time series to output to. Must be a valid metric name. Only one of `record` and `alert` must be set.
-
setRecord
public void setRecord(String record)
record defines the name of the time series to output to. Must be a valid metric name. Only one of `record` and `alert` must be set.
-
edit
public RuleBuilder edit()
- Specified by:
editin interfaceEditable<RuleBuilder>
-
toBuilder
public RuleBuilder toBuilder()
-
-