You need to enable JavaScript to run this app.
Application Performance Management Plus

Application Performance Management Plus

Copy page
Download PDF
Alert
SetAppAlarmRule
Copy page
Download PDF
SetAppAlarmRule
Create or update an app alert task.​
Request description​
RUM is deployed across multiple regions worldwide to provide more stable and low-latency access. You can refer to the Service addresses topic to choose the most suitable access point based on your business location.​
  • Request method: POST​
  • Request URL: https://apmplus-openapi.cn-beijing.volcengineapi.com?Action=SetAppAlarmRule&Version=2022-10-12​
Request parameters​
The following table lists only the request parameters specific to this API and some public parameters. For details, see Public parameters.​
​
Parameters​
Type​
Required​
Sample value​
Description​
Action​
String​
Yes​
SetAppAlarmRule​
The API name. The current API name is SetAppAlarmRule.​
Version​
String​
Yes​
2022-10-12​
The API version. The current API version is 2022-10-12.​
id​
Long​
No​
1​
Alert rule ID. It can be omitted if you are creating a new rule.​
name​
String​
Yes​
task_test​
Rule name.​
description​
String​
No​
alarm for xxx​
Rule description.​
monitor_type​
String​
Yes​
crash​
Monitoring type.​
  • crash: Crash​
  • crash_defend: Crash protection​
  • lag: Lag​
  • app_page_js_err: Page monitoring / JS error​
  • app_page_ajax_err: Page monitoring / Request error​
  • app_page_perf: Page monitoring / Performance​
  • app_event: Event alert​
  • net_err: Network error​
  • custom_exception: Custom error​
  • traffic_exception: Traffic​
  • disk_exception: Disk​
  • battery_trace: Battery​
  • cpu_exception:CPU​
alarm_level​
String​
Yes​
warning​
Alert level.​
  • warning​
  • fatal​
check_cycle​
Long​
Yes​
5​
Monitoring period, in minutes. Enter 0 for instant alerts.​
activations​
Array of Activation​
No​
-​
Multiple time periods.​
filter​
Object of FilterCondition​
No​
-​
Alert metric filter criteria.​
group_bys​
Array of GroupBy​
No​
-​
Alert grouping condition.​
hit_rule​
Object of AlarmHitRule​
Yes​
-​
Alert trigger condition.​
notice_conf​
Object of AlarmNoticeConf​
Yes​
-​
Notification configuration information.​
​
Activation​
​
Parameters​
Type​
Required​
Sample value​
Description​
activation_start​
String​
No​
08:00​
Start of all-day effective time. 24-hour format, accurate to the minute. For example, 9:00 AM is "09:00".​
activation_end​
String​
No​
23:00​
End of all-day effective time. 24-hour format, accurate to the minute. For example, 9:00 PM is "21:00".​
​
FilterCondition​
​
Parameters​
Type​
Required​
Sample value​
Description​
type​
String​
No​
and​
Condition type.​
  • expression: Expression​
  • and: AND operator​
  • or: OR operator​
dimension​
String​
No​
aid​
The name of the condition.​
op​
String​
No​
in​
The operator.​
  • in: contains​
value​
String​
No​
123456​
The filter value.​
values​
Array of String​
No​
[123456]​
The filter value. Multiple filter values are supported.​
sub_conditions​
Array of FilterCondition​
No​
-​
The sub-condition.​
​
GroupBy​
​
Parameters​
Type​
Required​
Sample value​
Description​
dimension​
String​
No​
path​
Group name.​
​
AlarmHitRule​
​
Parameters​
type​
Required​
Sample value​
Description​
type​
String​
Yes​
and​
Condition type.​
  • expression: Expression​
  • and: AND operator​
  • or: OR operator​
hit_rule_type​
String​
Yes​
threshold​
Rule type.​
  • threshold: Threshold​
  • compare: Year-over-year and period-over-period comparison​
threshold_calculate_type​
String​
Yes​
-​
Threshold calculation method. It can be addition, subtraction, or percentage.​
threshold_value​
Double​
Yes​
10,000​
Alert threshold.​
op​
String​
Yes​
gt​
The comparator.​
  • gt: greater than​
  • gte: greater than or equal to​
  • lt: less than​
  • lte: less than or equal to​
  • eq: equal to​
indicator​
Object of Indicator​
No​
-​
Threshold type parameter configuration.​
indicators​
Array of Indicator​
No​
-​
Year-over-year and period-over-period parameter configuration.​
sub_hit_rules​
Array of AlarmHitRule​
No​
-​
Sub-rule.​
​
AlarmNoticeConf​
​
Parameters​
Type​
Required​
Sample value​
Description​
type​
Array of String​
No​
mail​
Notification type.​
  • lark: Feishu​
  • mail: Email​
  • dingding: DingTalk​
  • wechat: WeCom​
lark_web_hooks​
Array of String​
No​
-​
The configuration for adding the Feishu webhook link.​
dingding_web_hooks​
Array of String​
No​
-​
DingTalk webhook.​
wechat_web_hooks​
Array of String​
No​
-​
WeChat webhook.​
alarm_receives​
Array of Candidate​
No​
-​
Receiver group.​
​
Indicator​
​
Parameters​
Type​
Required​
Sample value​
Description​
name​
String​
Yes​
crash_count​
Metric definition name, obtained via the GetAppAlarmMetricsConf API.​
value​
Double​
No​
10​
The metric value.​
recently​
Long​
Yes​
180​
Metric query time range, for example, 180min.​
compare_time​
Long​
Yes​
0​
Comparison time.​
  • 5: Previous five minutes​
  • 0: Current​
start_time​
Long​
No​
-​
Statistics start time.​
end_time​
Long​
No​
-​
Statistics end time.​
​
Candidate​
​
Parameters​
Type​
Required​
Sample value​
Description​
is_group​
Boolean​
No​
true​
Whether it is a receiver group.​
user_name​
String​
No​
-​
Single user.​
email​
String​
No​
-​
Group.​
group_name​
String​
No​
-​
Group name.​
group_id​
Integer​
No​
123​
Receiver group ID.​
​
Sample request​
​
POST https://apmplus-openapi.cn-beijing.volcengineapi.com?Action=SetAppAlarmRule&Version=2022-10-12​
{​
"name": "test_alarm_0401",​
"description": "",​
"alarm_level": "fatal",​
"filter": {​
"type": "and",​
"sub_conditions": [​
{​
"dimension": "aid",​
"type": "expression",​
"op": "in",​
"values": [​
"123456"​
]​
}​
]​
},​
"hit_rule": {​
"type": "and",​
"sub_hit_rules": [​
{​
"type": "expression",​
"hit_rule_type": "threshold",​
"indicator": {​
"name": "crash_count",​
"recently": 180,​
"compare_time": 0​
},​
"threshold_calculate_type": "",​
"threshold_value": 1,​
"op": "gte"​
}​
]​
},​
"check_cycle": 5,​
"activations": [​
{​
"activation_start": "00:00",​
"activation_end": "23:59"​
}​
],​
"group_bys": [​
{​
"dimension": "os"​
}​
],​
"notice_conf": {​
"type": [​
"lark"​
],​
"lark_web_hooks": [​
"https://open.feishu.cn/open-apis/bot/v2/hook/f135"​
]​
},​
"monitor_type": [​
"crash"​
],​
"id": 12345​
}
​
Response parameters​
​
Parameters​
Type​
Sample value​
Description​
error_msg​
String​
-​
Error message. If the request was successful, this field is empty.​
error_no​
Long​
0​
Error code. If the request was successful, its value is 0.​
​
Sample response​
​
{​
"error_msg": "",​
"error_no": 0​
}
​
Error codes​
No error codes are specific to this API. If the API call returns an error code, refer to Public error codes for troubleshooting.​
Last updated: 2026.09.16 17:47:31