根据id更新告警规则
开发中
PUT
https://api.flashcat.cloud/v1/n9e/alert-rule/{arid}
最后修改时间:2024-03-08 11:52:33
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api.flashcat.cloud/v1/n9e/alert-rule/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
"disabled": 1,
"name": "小于200G的盘,空间不足了",
"append_tags": [],
"note": "",
"prod": "metric",
"rule_config": {
"inhibit": true,
"queries": [
{
"prom_ql": "disk_used_percent > 90 and disk_total/1024/1024/1024 < 200",
"severity": 3
},
{
"prom_ql": "disk_used_percent > 95 and disk_total/1024/1024/1024 < 200",
"severity": 2
},
{
"prom_ql": "disk_used_percent > 99 and disk_total/1024/1024/1024 < 200",
"severity": 1
}
]
},
"enable_status": false,
"notify_channels": [],
"notify_groups": [],
"notify_recovered": 1,
"recover_duration": 0,
"notify_repeat_step": 60,
"notify_max_number": 0,
"callbacks": [],
"annotations": {},
"extra_config": {
"escalation": {},
"notify_aggregation": {}
},
"cate": "prometheus",
"datasource_ids": [
52
],
"prom_eval_interval": 30,
"prom_for_duration": 60,
"enable_in_bg": 0,
"enable_days_of_weeks": [
[
"0",
"1",
"2",
"3",
"4",
"5",
"6"
]
],
"enable_stimes": [
"00:00"
],
"enable_etimes": [
"23:59"
]
}'
响应示例响应示例
{
"err": ""
}
请求参数
Path 参数
arid
string
必需
Body 参数application/json
返回响应
修改于 2024-03-08 11:52:33