public static final class PutResourceMetricRuleRequest.Prometheus.Builder extends Object
构造器和说明 |
---|
Builder() |
限定符和类型 | 方法和说明 |
---|---|
PutResourceMetricRuleRequest.Prometheus.Builder |
annotations(List<PutResourceMetricRuleRequest.Annotations> annotations)
The annotations of the Prometheus alert rule.
|
PutResourceMetricRuleRequest.Prometheus |
build() |
PutResourceMetricRuleRequest.Prometheus.Builder |
level(String level)
The alert level.
|
PutResourceMetricRuleRequest.Prometheus.Builder |
promQL(String promQL)
PromQL statements are supported.
|
PutResourceMetricRuleRequest.Prometheus.Builder |
times(Integer times)
The number of consecutive triggers.
|
public PutResourceMetricRuleRequest.Prometheus.Builder annotations(List<PutResourceMetricRuleRequest.Annotations> annotations)
The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.
This parameter is equivalent to the annotations parameter of open source Prometheus.
public PutResourceMetricRuleRequest.Prometheus.Builder level(String level)
The alert level. Valid values:
Critical
public PutResourceMetricRuleRequest.Prometheus.Builder promQL(String promQL)
PromQL statements are supported.
example:The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.
cpuUsage{instanceId="xxxx"}[1m]>90
public PutResourceMetricRuleRequest.Prometheus.Builder times(Integer times)
The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.
example:3
public PutResourceMetricRuleRequest.Prometheus build()
Copyright © 2024. All rights reserved.