创建告警规则-cloudwatch 数据源
开发中
POST
https://api.flashcat.cloud/api/n9e/busi-group/{id}/alert-rules
最后修改时间:2025-04-01 02:54:37
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.flashcat.cloud/api/n9e/busi-group//alert-rules' \
--header 'Content-Type: application/json' \
--data-raw '{
"disabled": 0,
"name": "string",
"append_tags": [
"string"
],
"group_id": 0,
"note": "string",
"prod": "string",
"cate": "string",
"datasource_queries": [
{
"match_type": "string",
"op": "string",
"values": [
0
]
}
],
"rule_config": {
"inhibit": true,
"queries": {
"from": 0,
"to": 0,
"ref": "string",
"queries": [
{
"region": "string",
"namespace": "string",
"metric_name": "string",
"dimensions": [
{
"name": "string",
"value": "string"
}
],
"expression": "string",
"period": 0,
"statistic": "string",
"query_id": "string",
"query_type": "string",
"metric_editor_mode": 0,
"offset": 0,
"return_data": true,
"match_exact": true,
"ref": "string",
"unit": "string",
"alias": "string"
}
]
},
"triggers": [
{}
],
"event_relabel_config": [
{
"action": "string",
"regex": "string",
"replacement": "string",
"separator": "string",
"source_labels": [
"string"
],
"target_label": "string"
}
],
"task_tpls": [
{
"tpl_id": "string",
"tpl_name": "string",
"host": [
"string"
]
}
]
},
"cron_pattern": "string",
"notify_version": "string",
"notify_rule_ids": [
0
],
"notify_channels": [
"string"
],
"notify_groups": [
"string"
],
"notify_recovered": 0,
"recover_duration": 0,
"notify_repeat_step": 0,
"notify_max_number": 0,
"callbacks": [
"string"
],
"annotations": {
"dashboard_url": "string"
},
"enable_days_of_weeks": [
[
"string"
]
],
"enable_stimes": [
"string"
],
"enable_etimes": [
"string"
],
"extra_config": {
"enrich_queries": [
"string"
]
}
}'
响应示例响应示例
{
"error": {
"code": "InvalidParameter",
"message": "string"
},
"request_id": "string"
}
请求参数
Path 参数
id
string
必需
Body 参数application/json