public class CreateOrUpdateAlertRuleRequest
extends com.aliyun.tea.TeaModel
| 限定符和类型 | 类和说明 |
|---|---|
static class |
CreateOrUpdateAlertRuleRequest.CreateOrUpdateAlertRuleRequestMarkTags |
static class |
CreateOrUpdateAlertRuleRequest.CreateOrUpdateAlertRuleRequestTags |
| 限定符和类型 | 字段和说明 |
|---|---|
String |
alertCheckType
The alert check type of the Prometheus alert rule.
|
Long |
alertGroup
The alert contact group ID of the Prometheus alert rule.
|
Long |
alertId
The ID of the alert rule.
|
String |
alertName
The name of the alert rule.
|
String |
alertPiplines
The configuration of the alert sending channel.
|
String |
alertRuleContent
The content of the Application Monitoring or Browser Monitoring alert rule.
|
String |
alertStatus
The status of the alert rule.
|
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
This parameter is required.
|
String |
annotations
The annotations of the Prometheus alert rule.
|
Boolean |
autoAddNewApplication
Specifies whether to apply the alert rule to new applications that are created in Application Monitoring or Browser Monitoring.
|
String |
autoAddTargetConfig |
String |
clusterId
The ID of the monitored cluster.
|
String |
dataConfig
Data Configuration.
|
Long |
duration
The duration of the Prometheus alert rule.
|
String |
filters
The filter conditions of the Application Monitoring or Browser Monitoring alert rule.
|
String |
labels
The tags of the Prometheus alert rule.
|
String |
level
The severity level of the Prometheus alert rule.
|
List<CreateOrUpdateAlertRuleRequest.CreateOrUpdateAlertRuleRequestMarkTags> |
markTags
Application Tags.
|
String |
message
The alert message of the Prometheus alert rule.
|
String |
metricsKey
The alert metrics.
|
String |
metricsType
The metric type of the Application Monitoring or Browser Monitoring alert rule.
|
String |
notice
The effective time and notification time.
|
String |
notifyMode
Notification Mode.
|
String |
notifyStrategy
The notification policy.
|
String |
pids
The process ID (PID) that is associated with the Application Monitoring or Browser Monitoring alert rule.
|
String |
product
It is determined when creating the underlying rules of Prometheus.
|
String |
promQL
The PromQL statement of the Prometheus alert rule.
|
String |
regionId
The region ID.
|
List<CreateOrUpdateAlertRuleRequest.CreateOrUpdateAlertRuleRequestTags> |
tags
The list of tags.
|
| 构造器和说明 |
|---|
CreateOrUpdateAlertRuleRequest() |
@NameInMap(value="AlertCheckType") public String alertCheckType
The alert check type of the Prometheus alert rule. Valid values:
STATIC
@NameInMap(value="AlertGroup") public Long alertGroup
The alert contact group ID of the Prometheus alert rule. Valid values:
-1
@NameInMap(value="AlertId") public Long alertId
The ID of the alert rule.
546xxx
@NameInMap(value="AlertName") public String alertName
The name of the alert rule.
This parameter is required.
example:Alert Rule Demo
@NameInMap(value="AlertPiplines") public String alertPiplines
The configuration of the alert sending channel. This parameter is used to be compatible with the old version of the rule.
example:@NameInMap(value="AlertRuleContent") public String alertRuleContent
The content of the Application Monitoring or Browser Monitoring alert rule. The following code provides an example of the AlertRuleContent parameter. For more information about the meaning of each field, see the supplementary description.
{
"Condition": "OR",
"AlertRuleItems": [
{ "Operator": "CURRENT_LTE",
"MetricKey": "appstat.jvm.threadcount",
"Value": 1000,
"Aggregate": "AVG",
"N": 10,
"Tolerability": 169
}
]
}
example: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.
{ "Condition": "OR", "AlertRuleItems": [ { "Operator": "CURRENT_LTE", "MetricKey": "appstat.jvm.threadcount", "Value": 1000, "Aggregate": "AVG", "N": 1 } ] }
@NameInMap(value="AlertStatus") public String alertStatus
The status of the alert rule. Valid values:
RUNNING
@NameInMap(value="AlertType") public String alertType
The following alert rule types are available:
This parameter is required.
example:APPLICATION_MONITORING_ALERT_RULE
@NameInMap(value="Annotations") public String annotations
The annotations of the Prometheus alert rule.
example:[ { "Value": "PolarDB slow queries", "Name": "_aliyun_display_name" }
@NameInMap(value="AutoAddNewApplication") public Boolean autoAddNewApplication
Specifies whether to apply the alert rule to new applications that are created in Application Monitoring or Browser Monitoring. Valid values:
true: enables the health check feature.false: disables the automatic backup feature.false
@NameInMap(value="AutoAddTargetConfig") public String autoAddTargetConfig
@NameInMap(value="ClusterId") public String clusterId
The ID of the monitored cluster.
example:ceba9b9ea5b924dd0b6726d2de6******
@NameInMap(value="DataConfig") public String dataConfig
Data Configuration. The dataRevision field specifies the data repair method when there is no data for the metric.
{ "dataRevision": 2 }
@NameInMap(value="Duration") public Long duration
The duration of the Prometheus alert rule. Unit: minutes.
example:1
@NameInMap(value="Filters") public String filters
The filter conditions of the Application Monitoring or Browser Monitoring alert rule. Format:
"DimFilters": [
{
"FilterOpt": "ALL",
"FilterValues": [], //The value of the filter condition.
"FilterKey": "rootIp" //The key of the filter condition.
}
]
Valid values of FilterOpt:
{"DimFilters": [ { "FilterOpt": "ALL", "FilterValues": [], "FilterKey": "rootIp" } ] }
@NameInMap(value="Labels") public String labels
The tags of the Prometheus alert rule.
example:[ { "Value": "cms_polardb", "Name": "_aliyun_cloud_product" } ]
@NameInMap(value="Level") public String level
The severity level of the Prometheus alert rule.
P2
@NameInMap(value="MarkTags") public List<CreateOrUpdateAlertRuleRequest.CreateOrUpdateAlertRuleRequestMarkTags> markTags
Application Tags. Used for application monitoring alert rules, to filter applications associated with alert rules.
@NameInMap(value="Message") public String message
The alert message of the Prometheus alert rule.
example:Namespace: {{$labels.namespace}} / Pod: {{$labels.pod_name}} / Container: {{$labels.container}} Memory usage exceeds 80%. Current value: {{ printf \\\\\"%.2f\\\\\" $value }}%
@NameInMap(value="MetricsKey") public String metricsKey
The alert metrics. If you set the AlertCheckType parameter to STATIC when you create a Prometheus alert rule, you must specify the MetricsKey parameter.
example: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.
pop.status.error
@NameInMap(value="MetricsType") public String metricsType
The metric type of the Application Monitoring or Browser Monitoring alert rule. For more information, see the following table.
example:jvm
@NameInMap(value="Notice") public String notice
The effective time and notification time. This parameter is used to be compatible with the old version of the rule.
example:@NameInMap(value="NotifyMode") public String notifyMode
Notification Mode. Normal mode or Simplified mode.
example:NORMAL_MODE
@NameInMap(value="NotifyStrategy") public String notifyStrategy
The notification policy.
569xxx
@NameInMap(value="Pids") public String pids
The process ID (PID) that is associated with the Application Monitoring or Browser Monitoring alert rule.
example:["b590lhguqs@40d8deedfa9******"]
@NameInMap(value="Product") public String product
It is determined when creating the underlying rules of Prometheus. The background will verify whether the product exists, which is used to distinguish cloud product filtering queries.
example:xxxx
@NameInMap(value="PromQL") public String promQL
The PromQL statement of the Prometheus alert rule.
example:node_memory_MemAvailable_bytes{} / node_memory_MemTotal_bytes{} * 100
@NameInMap(value="RegionId") public String regionId
The region ID.
This parameter is required.
example:cn-hangzhou
@NameInMap(value="Tags") public List<CreateOrUpdateAlertRuleRequest.CreateOrUpdateAlertRuleRequestTags> tags
The list of tags.
public static CreateOrUpdateAlertRuleRequest build(Map<String,?> map) throws Exception
Exceptionpublic CreateOrUpdateAlertRuleRequest setAlertCheckType(String alertCheckType)
public String getAlertCheckType()
public CreateOrUpdateAlertRuleRequest setAlertGroup(Long alertGroup)
public Long getAlertGroup()
public CreateOrUpdateAlertRuleRequest setAlertId(Long alertId)
public Long getAlertId()
public CreateOrUpdateAlertRuleRequest setAlertName(String alertName)
public String getAlertName()
public CreateOrUpdateAlertRuleRequest setAlertPiplines(String alertPiplines)
public String getAlertPiplines()
public CreateOrUpdateAlertRuleRequest setAlertRuleContent(String alertRuleContent)
public String getAlertRuleContent()
public CreateOrUpdateAlertRuleRequest setAlertStatus(String alertStatus)
public String getAlertStatus()
public CreateOrUpdateAlertRuleRequest setAlertType(String alertType)
public String getAlertType()
public CreateOrUpdateAlertRuleRequest setAnnotations(String annotations)
public String getAnnotations()
public CreateOrUpdateAlertRuleRequest setAutoAddNewApplication(Boolean autoAddNewApplication)
public Boolean getAutoAddNewApplication()
public CreateOrUpdateAlertRuleRequest setAutoAddTargetConfig(String autoAddTargetConfig)
public String getAutoAddTargetConfig()
public CreateOrUpdateAlertRuleRequest setClusterId(String clusterId)
public String getClusterId()
public CreateOrUpdateAlertRuleRequest setDataConfig(String dataConfig)
public String getDataConfig()
public CreateOrUpdateAlertRuleRequest setDuration(Long duration)
public Long getDuration()
public CreateOrUpdateAlertRuleRequest setFilters(String filters)
public String getFilters()
public CreateOrUpdateAlertRuleRequest setLabels(String labels)
public String getLabels()
public CreateOrUpdateAlertRuleRequest setLevel(String level)
public String getLevel()
public CreateOrUpdateAlertRuleRequest setMarkTags(List<CreateOrUpdateAlertRuleRequest.CreateOrUpdateAlertRuleRequestMarkTags> markTags)
public List<CreateOrUpdateAlertRuleRequest.CreateOrUpdateAlertRuleRequestMarkTags> getMarkTags()
public CreateOrUpdateAlertRuleRequest setMessage(String message)
public String getMessage()
public CreateOrUpdateAlertRuleRequest setMetricsKey(String metricsKey)
public String getMetricsKey()
public CreateOrUpdateAlertRuleRequest setMetricsType(String metricsType)
public String getMetricsType()
public CreateOrUpdateAlertRuleRequest setNotice(String notice)
public String getNotice()
public CreateOrUpdateAlertRuleRequest setNotifyMode(String notifyMode)
public String getNotifyMode()
public CreateOrUpdateAlertRuleRequest setNotifyStrategy(String notifyStrategy)
public String getNotifyStrategy()
public CreateOrUpdateAlertRuleRequest setPids(String pids)
public String getPids()
public CreateOrUpdateAlertRuleRequest setProduct(String product)
public String getProduct()
public CreateOrUpdateAlertRuleRequest setPromQL(String promQL)
public String getPromQL()
public CreateOrUpdateAlertRuleRequest setRegionId(String regionId)
public String getRegionId()
public CreateOrUpdateAlertRuleRequest setTags(List<CreateOrUpdateAlertRuleRequest.CreateOrUpdateAlertRuleRequestTags> tags)
public List<CreateOrUpdateAlertRuleRequest.CreateOrUpdateAlertRuleRequestTags> getTags()
Copyright © 2024. All rights reserved.