Parameter | Type | Required | Description | Example |
muteUntil | int | No | The time at which the alert rule is temporarily disabled. | 1698907508 |
version | String | Yes | The version of the alert rule. | 2.0 |
type | String | No | The type of the alert rule. | default |
dashboard | String | No | The ID of the dashboard with which the alert rule is associated. | dasnboardExample |
threshold | int | Yes | The maximum number of consecutive times that the trigger condition can be met. | 1 |
noDataFire | bool | Yes | Specifies whether to enable the no-data alert feature. | False |
noDataSeverity | int | No | The severity of the no-data alert. | 6 |
sendResolved | bool | Yes | Specifies whether to send a recovery notification after an alert is cleared. | False |
autoAnnotation | bool | Yes | Specifies whether to allow the system to automatically add annotations. | False |
queryList | List | Yes | The query statements. For more information about the variables in query statements, see AlertQuery. | [{
"storeType": "log",
"region": "cn-hangzhou",
"project": "demo-test-project",
"store": "test-logstore",
"query": "* | select count(*) cnt",
"timeSpanType": "Truncated",
"start": "-1m",
"end": "absolute",
"powerSqlMode": "auto"
}]
|
annotations | List | No | The annotations of the alert. For more information about the variables in annotations, see AlertTag. | [{
"key": "title",
"value": "Nginx Status Error"
}, {
"key": "desc",
"value": "Nginx Status Error, count: ${cnt}"
}]
|
labels | List | No | The labels of the alert. For more information about the variables in labels, see AlertTag. | [{
"key": "service",
"value": "nginx"
}]
|
templateConfiguration | Dictionary | No | The configuration of the alert template. For more information, see TemplateConfiguration. | {
"id": "sls.app.ack.ip.not_enough",
"type": "sys",
"lang": "cn"
}
|
conditionConfiguration | Dictionary | No | The condition that is used to trigger alerts. For more information, see ConditionConfiguration. | {
"condition": "cnt > 100",
"countCondition": ""
}
|
severityConfigurations | List | Yes | The configurations of the alert severity. For more information about the variables in configurations, see SeverityConfiguration. | [{
"severity": 6,
"evalCondition": {
"condition": "cnt > 0",
"countCondition": ""
}
}]
|
joinConfigurations | List | No | The set operation configurations for the query statements of the alert rule. For more information about the variables in configurations, see JoinConfiguration. | [{
"type": "left_join",
"condition": "$0.id == $1.id"
}]
|
groupConfiguration | Dictionary | Yes | The configuration of group evaluation. For more information, see GroupConfiguration. | {
"type": "no_group",
"fields": []
}
|
policyConfiguration | Dictionary | No | The configuration for sending alerts to Simple Log Service Notification. For more information, see PolicyConfiguration. | {
"alertPolicyId": "sls.builtin.dynamic",
"actionPolicyId": "test-action-policy",
"repeatInterval": "1m",
"useDefault": False
}
|
sinkEventStore | Dictionary | No | The configuration for sending alerts to Eventstore. For more information, see SinkEventStoreConfiguration. | {
"enabled": TRUE,
"endpoint": "cn-shanghai-intranet.log.aliyuncs.com",
"project": "exampleProject",
"eventStore": "exampleStore",
"roleArn": "acs:ram::123456789:role/aliyunlogetlrole"
}
|
sinkCms | Dictionary | No | The configuration for sending alerts to CloudMonitor Event Center. For more information, see SinkCmsConfiguration. | {
"enabled": True
}
|
sinkAlerthub | Dictionary | No | The configuration for sending alerts to the notification system of Simple Log Service. For more information, see SinkAlerthubConfiguration. | {
"enabled": True
}
|
tags | List | No | The custom tags of the alert. | ["host"]
|