public static final class CreateOrUpdateAlertRuleRequest.Builder extends Object
限定符和类型 | 方法和说明 |
---|---|
CreateOrUpdateAlertRuleRequest.Builder |
alertCheckType(String alertCheckType)
The alert check type of the Prometheus alert rule.
|
CreateOrUpdateAlertRuleRequest.Builder |
alertGroup(Long alertGroup)
The alert contact group ID of the Prometheus alert rule.
|
CreateOrUpdateAlertRuleRequest.Builder |
alertId(Long alertId)
The ID of the alert rule.
|
CreateOrUpdateAlertRuleRequest.Builder |
alertName(String alertName)
The name of the alert rule.
|
CreateOrUpdateAlertRuleRequest.Builder |
alertPiplines(String alertPiplines)
The configuration of the alert sending channel.
|
CreateOrUpdateAlertRuleRequest.Builder |
alertRuleContent(String alertRuleContent)
The content of the Application Monitoring or Browser Monitoring alert rule.
|
CreateOrUpdateAlertRuleRequest.Builder |
alertStatus(String alertStatus)
The status of the alert rule.
|
CreateOrUpdateAlertRuleRequest.Builder |
alertType(String alertType)
The following alert rule types are available:
* APPLICATION_MONITORING_ALERT_RULE: alert rule for Application Monitoring
* BROWSER_MONITORING_ALERT_RULE: alert rule for Browser Monitoring
* RUM_MONITORING_ALERT_RULE: alert rule for RUM Monitoring
* PROMETHEUS_MONITORING_ALERT_RULE: alert rule for Managed Service for Prometheus
* XTRACE_MONITORING_ALERT_RULE: alert rule for Managed Service for OpenTelemetry
* EBPF_MONITORING_ALERT_RULE: alert rule for Application Monitoring eBPF Edition
|
CreateOrUpdateAlertRuleRequest.Builder |
annotations(String annotations)
The annotations of the Prometheus alert rule.
|
CreateOrUpdateAlertRuleRequest.Builder |
autoAddNewApplication(Boolean autoAddNewApplication)
Specifies whether to apply the alert rule to new applications that are created in Application Monitoring or Browser Monitoring.
|
CreateOrUpdateAlertRuleRequest.Builder |
autoAddTargetConfig(String autoAddTargetConfig)
AutoAddTargetConfig.
|
CreateOrUpdateAlertRuleRequest |
build() |
CreateOrUpdateAlertRuleRequest.Builder |
clusterId(String clusterId)
The ID of the monitored cluster.
|
CreateOrUpdateAlertRuleRequest.Builder |
dataConfig(String dataConfig)
Data Configuration.
|
CreateOrUpdateAlertRuleRequest.Builder |
duration(Long duration)
The duration of the Prometheus alert rule.
|
CreateOrUpdateAlertRuleRequest.Builder |
filters(String filters)
The filter conditions of the Application Monitoring or Browser Monitoring alert rule.
|
CreateOrUpdateAlertRuleRequest.Builder |
labels(String labels)
The tags of the Prometheus alert rule.
|
CreateOrUpdateAlertRuleRequest.Builder |
level(String level)
The severity level of the Prometheus alert rule.
|
CreateOrUpdateAlertRuleRequest.Builder |
markTags(List<CreateOrUpdateAlertRuleRequest.MarkTags> markTags)
Application Tags.
|
CreateOrUpdateAlertRuleRequest.Builder |
message(String message)
The alert message of the Prometheus alert rule.
|
CreateOrUpdateAlertRuleRequest.Builder |
metricsKey(String metricsKey)
The alert metrics.
|
CreateOrUpdateAlertRuleRequest.Builder |
metricsType(String metricsType)
The metric type of the Application Monitoring or Browser Monitoring alert rule.
|
CreateOrUpdateAlertRuleRequest.Builder |
notice(String notice)
The effective time and notification time.
|
CreateOrUpdateAlertRuleRequest.Builder |
notifyMode(String notifyMode)
Notification Mode.
|
CreateOrUpdateAlertRuleRequest.Builder |
notifyStrategy(String notifyStrategy)
The notification policy.
|
CreateOrUpdateAlertRuleRequest.Builder |
pids(String pids)
The process ID (PID) that is associated with the Application Monitoring or Browser Monitoring alert rule.
|
CreateOrUpdateAlertRuleRequest.Builder |
product(String product)
It is determined when creating the underlying rules of Prometheus.
|
CreateOrUpdateAlertRuleRequest.Builder |
promQL(String promQL)
The PromQL statement of the Prometheus alert rule.
|
CreateOrUpdateAlertRuleRequest.Builder |
regionId(String regionId)
The region ID.
|
CreateOrUpdateAlertRuleRequest.Builder |
tags(List<CreateOrUpdateAlertRuleRequest.Tags> tags)
The list of tags.
|
public CreateOrUpdateAlertRuleRequest.Builder alertCheckType(String alertCheckType)
* STATIC: a static threshold value. If you set the parameter to STATIC, you must specify the **MetricsKey** parameter. For more information, see the **Correspondence between AlertGroup and MetricsKey for Prometheus Service** table. * CUSTOM: a custom PromQL statement. If you set the parameter to CUSTOM, you must specify the **PromQL**, **Duration**, and **Message** parameters to create a Prometheus alert rule.
public CreateOrUpdateAlertRuleRequest.Builder alertGroup(Long alertGroup)
* \-1: custom PromQL * 1: Kubernetes load * 15: Kubernetes node
public CreateOrUpdateAlertRuleRequest.Builder alertId(Long alertId)
* If you do not specify this parameter, a new alert rule is created. * If you specify this parameter, the specified alert rule is modified.
public CreateOrUpdateAlertRuleRequest.Builder alertName(String alertName)
public CreateOrUpdateAlertRuleRequest.Builder alertPiplines(String alertPiplines)
public CreateOrUpdateAlertRuleRequest.Builder alertRuleContent(String alertRuleContent)
```json { "Condition": "OR", "AlertRuleItems": [ { "Operator": "CURRENT_LTE", "MetricKey": "appstat.jvm.threadcount", "Value": 1000, "Aggregate": "AVG", "N": 10, "Tolerability": 169 } ] } ``` > The filter conditions specified by the **AlertRuleItems.MetricKey** field depends on the value of the **MetricsType** parameter. For more information about the types of metrics supported by Application Monitoring and Browser Monitoring and the alert rule fields corresponding to each metric, see the supplementary description.
public CreateOrUpdateAlertRuleRequest.Builder alertStatus(String alertStatus)
* RUNNING (default) * STOPPED
public CreateOrUpdateAlertRuleRequest.Builder alertType(String alertType)
* APPLICATION_MONITORING_ALERT_RULE: alert rule for Application Monitoring * BROWSER_MONITORING_ALERT_RULE: alert rule for Browser Monitoring * RUM_MONITORING_ALERT_RULE: alert rule for RUM Monitoring * PROMETHEUS_MONITORING_ALERT_RULE: alert rule for Managed Service for Prometheus * XTRACE_MONITORING_ALERT_RULE: alert rule for Managed Service for OpenTelemetry * EBPF_MONITORING_ALERT_RULE: alert rule for Application Monitoring eBPF Edition
public CreateOrUpdateAlertRuleRequest.Builder annotations(String annotations)
public CreateOrUpdateAlertRuleRequest.Builder autoAddNewApplication(Boolean autoAddNewApplication)
* `true`: enables the health check feature. * `false`: disables the automatic backup feature.
public CreateOrUpdateAlertRuleRequest.Builder autoAddTargetConfig(String autoAddTargetConfig)
public CreateOrUpdateAlertRuleRequest.Builder clusterId(String clusterId)
public CreateOrUpdateAlertRuleRequest.Builder dataConfig(String dataConfig)
- Fill with zero: 0 - Fill with one: 1 - Fill with null: 2 (default, does not trigger an alarm)
public CreateOrUpdateAlertRuleRequest.Builder duration(Long duration)
public CreateOrUpdateAlertRuleRequest.Builder filters(String filters)
"DimFilters": [ { "FilterOpt": "ALL", "FilterValues": [], //The value of the filter condition. "FilterKey": "rootIp" //The key of the filter condition. } ] Valid values of **FilterOpt**: * STATIC: matches the value of the specified dimension. * ALL: traverses all dimension values. Dynamic thresholds do not support traversal. * DISABLE: aggregates the values of all dimensions.
public CreateOrUpdateAlertRuleRequest.Builder labels(String labels)
public CreateOrUpdateAlertRuleRequest.Builder level(String level)
* P1: Alert notifications are sent for major issues that affect the availability of core business, have a huge impact, and may lead to serious consequences. * P2: Alert notifications are sent for service errors that affect the system availability with relatively limited impact. * P3: Alert notifications are sent for issues that may cause service errors or negative effects, or alert notifications for services that are relatively less important. * P4: Alert notifications are sent for low-priority issues that do not affect your business. * Default: Alert notifications are sent regardless of alert levels.
public CreateOrUpdateAlertRuleRequest.Builder markTags(List<CreateOrUpdateAlertRuleRequest.MarkTags> markTags)
public CreateOrUpdateAlertRuleRequest.Builder message(String message)
public CreateOrUpdateAlertRuleRequest.Builder metricsKey(String metricsKey)
> Alert metrics vary depending on the value of the **AlertGroup** parameter. For more information about the correspondence between **AlertGroup** and **MetricsKey**, see the supplementary description.
public CreateOrUpdateAlertRuleRequest.Builder metricsType(String metricsType)
public CreateOrUpdateAlertRuleRequest.Builder notice(String notice)
public CreateOrUpdateAlertRuleRequest.Builder notifyMode(String notifyMode)
public CreateOrUpdateAlertRuleRequest.Builder notifyStrategy(String notifyStrategy)
* If you set this parameter to null, no notification policy is specified. After you create an alert rule, you can create a notification policy and specify match rules and match conditions. For example, you can specify the name of the alert rule as the match condition. When the alert rule is triggered, an alert event is generated and an alert notification is sent to the contacts or contact groups that are specified in the notification policy. * To specify a notification policy, set this parameter to the ID of the notification policy. Application Real-Time Monitoring Service (ARMS) automatically adds a match rule to the notification policy and specifies the ID of the alert rule as the match condition. The name of the alert rule is also displayed. This way, the alert events that are generated based on the alert rule can be matched by the specified notification policy.
public CreateOrUpdateAlertRuleRequest.Builder pids(String pids)
public CreateOrUpdateAlertRuleRequest.Builder product(String product)
public CreateOrUpdateAlertRuleRequest.Builder promQL(String promQL)
public CreateOrUpdateAlertRuleRequest.Builder regionId(String regionId)
public CreateOrUpdateAlertRuleRequest.Builder tags(List<CreateOrUpdateAlertRuleRequest.Tags> tags)
public CreateOrUpdateAlertRuleRequest build()
Copyright © 2024. All rights reserved.