You need to enable JavaScript to run this app.
Volcengine Managed Service for Prometheus

Volcengine Managed Service for Prometheus

Copy page
Download PDF
Alert templates
UpdateAlertingRuleGroup
Copy page
Download PDF
UpdateAlertingRuleGroup
Update alerting rule groups.​
Request description​
Volcengine Managed Service for Prometheus has been deployed in multiple regions worldwide to provide you with a more stable, lower-latency experience. You can choose an optimal access point for your service region by referring to the Service addresses topic.​
  • Request method: POST​
  • Request URL: https://vmp.cn-beijing.volcengineapi.com?Action=UpdateAlertingRuleGroup&Version=2021-03-03​
Debugging​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
​
Parameters​
Type​
Required​
Sample value​
Description​
Action​
String​
Yes​
UpdateAlertingRuleGroup​
The API name. The API name is UpdateAlertingRuleGroup.​
Version​
String​
Yes​
2021-03-03​
The API version. The API version is 2021-03-03.​
Id​
String​
Yes​
421d-****-6037****​
ID of alerting rule group.​
AlertingRuleTemplateVersion​
String​
No​
1.0.1​
Version of alerting rule template. Leaving it empty indicates the latest version.​
Name​
String​
No​
test​
The name of the alert rule group.​
  • It is a string consisting of 1 to 64 characters.​
  • The name cannot start with a digit, a hyphen (-), an underscore (_), or other special characters.​
  • It can only contain uppercase and lowercase letters, Chinese characters, digits, hyphens (-), and underscores (_).​
Description​
String​
No​
-​
Description of alerting rule group.​
It is a string that can be up to 4096 characters in length.​
WorkspaceId​
String​
No​
421d-****-ba4d***​
Workspace ID​
You can call the ListWorkspaces API to obtain the workspace ID.​
Items​
No​
-​
A list of associated alerting rules.​
NotifyPolicyId​
String​
No​
421d-****-ba4d***​
Alert notification policy ID.​
NotifyGroupPolicyId​
String​
No​
421d-****-ba4d***​
Alert aggregation policy ID.​
Variables​
Array of VariableValue​
No​
-​
Variable configuration.​
NotifyGroupPolicySource​
String​
No​
VMP​
The source of the alert aggregation policy.​
NotifyPolicySource​
String​
No​
VMP​
The alert notification policy source.​
​
AlertingRuleGroupItemValue​
​
Parameters​
Type​
Required​
Sample value​
Description​
Id​
Long​
Yes​
1​
The serial number of the alert rule template item.​
Enable​
Boolean​
Yes​
true​
Status of alerting rule. Available values:​
  • true: enable​
  • false: disable​
Labels​
Array of TemplateKV​
No​
-​
labels in alerting notifications.​
Levels​
Array of AlertingRuleLevel​
No​
-​
Alerting level.​
Annotations​
Array of TemplateKV​
No​
-​
Annotations in alerting notifications.​
​
VariableValue​
​
Parameters​
Type​
Required​
Sample value​
Description​
Id​
Long​
No​
1​
ID of variable.​
You can call the ListAlertingRuleTemplates API to obtain variable IDs in alert templates.​
Name​
String​
No​
Cluster​
The variable name. It corresponds to the Name in AlertingRuleTemplate.Variables. It can be used to replace the ID for stable matching during upgrades or variable reordering.​
Values​
Array of String​
No​
demo​
Default value of variable. If the value is left empty:​
  • When the parameter IncludeAll with value False is received by API ListAlertingRuleTemplates, it means none of the templates will be selected.​
  • When the parameter IncludeAll with value True is received by API ListAlertingRuleTemplates, it means all of the templates will be selected.​
​
TemplateKV​
​
Parameters​
Type​
Required​
Sample value​
Description​
Name​
String​
Yes​
key1​
Tag key.​
Value​
String​
No​
value1​
Value of label. Leaving it empty means the key will be deleted correspondingly.​
​
AlertingRuleLevel​
​
Parameters​
Type​
Required​
Sample value​
Description​
Level​
String​
Yes​
P0​
Alerting rule level. Level P0, P1, and P2 are available currently.​
For​
String​
Yes​
5 minutes​
Alert duration, value:​
  • 0s: raise immediately​
  • 1m: 1 minute​
  • 2m: 2 minutes​
  • 5m: 5 minutes​
  • 10m: 10 minutes​
Comparator​
String​
Yes​
>​
Operators used in alert rules:​
  • >: greater than​
  • >=: greater than or equal to​
  • <: less than​
  • <=: less than or equal to​
  • ==: equal to​
  • !=: not equal to​
Threshold​
Double​
No​
1.0​
Threshold of the alert rule.​
​
Sample request​
​
POST https://vmp.cn-beijing.volcengineapi.com?Action=UpdateAlertingRuleGroup&Version=2021-03-03​
Content-Type: application/json​
{​
"Id": "421d-****-6037****",​
"AlertingRuleTemplateVersion": "1.0.1",​
"Name": "test",​
"Description": "-",​
"WorkspaceId": "421d-****-ba4d***",​
"Items": [​
{​
"Id": 1,​
"Enable": true,​
"Labels": [​
{​
"Name": "key1",​
"Value": "value1"​
}​
],​
"Levels": [​
{​
"For": "5m",​
"Level": "P0",​
"Threshold": 1,​
"Comparator": "\\>"​
}​
],​
"Annotations": [​
{​
"Name": "key1",​
"Value": "value1"​
}​
]​
}​
],​
"NotifyPolicyId": "421d-****-ba4d***",​
"NotifyGroupPolicyId": "421d-****-ba4d***",​
"Variables": [​
{​
"Id": 1,​
"Name": "Cluster",​
"Values": [​
""​
]​
}​
],​
"NotifyGroupPolicySource": "VMP",​
"NotifyPolicySource": "VMP"​
}
​
Response parameters​
​
Parameters​
Type​
Sample value​
Description​
Id​
String​
e28b-****-8808​
ID of alerting rule group.​
​
Sample response​
​
HTTP/1.1: 200 OK​
Content-Type: application/json​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "UpdateAlertingRuleGroup",​
"Version": "2021-03-03",​
"Service": "vmp",​
"Region": "cn-beijing"​
},​
"Result": {​
"Id": "e28b-****-8808"​
}​
}
​
Error codes​
The error codes for this API are listed in the table below. For a list of error codes for other APIs, see Public error codes.​
​
HTTP status codes​
Error codes​
Error messages​
Description​
403​
ProductUnsubscribed​
You are not subscribed to VMP. Please go to the VMP console web page to subscribe to the service​
The current account is not subscribed to the VMP service.​
400​
InvalidParameter.{{parameter}}​
The specified parameter {{parameter}} is invalid.​
The input is invalid. For example, the workspace name does not meet the requirements.​
400​
MissingParameter.{{parameter}}​
The required parameter {{parameter}} is missing.​
A required parameter is missing.​
​
Last updated: 2026.10.27 14:30:06