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

Volcengine Managed Service for Prometheus

Copy page
Download PDF
Alerting rules
ListAlertingRules
Copy page
Download PDF
ListAlertingRules
Obtain the list of alerting rules.​
Request descriptions​
Volcengine Managed Service for Prometheus has been deployed in multiple regions worldwide, aiming to provide you with an experience of higher stability and lower latency. 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=ListAlertingRules&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​
​
Parameter​
Type​
Required​
Sample value​
Description​
Action​
String​
Yes​
ListAlertingRules​
API name. The API name is ListAlertingRules.​
Version​
String​
Yes​
2021-03-03​
API version. The API version is 2021-03-03.​
PageNumber​
Long​
No​
1​
Current page number. The minimum and default values are both 1.​
PageSize​
Long​
No​
10​
Results per page:​
  • A number from 0 to 100.​
  • The default value is 10.​
Filter​
Object of AlertingRuleFilter​
No​
-​
Filter conditions for alerting rules.​
SortBy​
String​
No​
CreatedAt​
Whether to perform query result sorting:​
  • The value CreatedAt indicates the results will be sorted. ​
  • Absence of this parameter indicates no sorting.​
SortOrder​
String​
No​
Asc​
Sorting order of query results:​
  • Asc: indicates sorting in ascending order.​
  • Desc: indicates sorting in descending order.​
​
AlertingRuleFilter​
​
Parameter​
Type​
Required​
Sample value​
Description​
Ids​
Array of String​
No​
["90b5a3da-3464-4718-92e4-039bf41d3cff"]​
Exact query by alerting rule IDs.​
Name​
String​
No​
alert-rule-demo​
Fuzzy query by the names of alerting rules.​
Type​
String​
No​
vmp/PromQL​
Exact query by alerting rule types.​
WorkspaceId​
String​
No​
e28ae750-bbb8-4ff4-abf4-1e0e0f88808c​
Exact query by workspace IDs.​
NotifyPolicyIds​
Array of String​
No​
["e28ae750-bbb8-4ff4-abf4-1e0e0f88808c"]​
Exact query by IDs of alerting notification policies.​
NotifyGroupPolicyIds​
Array of String​
No​
["e28ae750-bbb8-4ff4-abf4-1e0e0f88808c"]​
Exact query by IDs of alerting aggregation policies.​
Status​
String​
No​
Running​
Filter by alerting rule status:​
  • Running: rules that are enabled​
  • Disabled: rules that are disabled​
​
Sample requests​
​
POST https://vmp.cn-beijing.volcengineapi.com/?Action=ListAlertingRules&Version=2021-03-03​
Content-Type: application/json​
{​
"PageNumber": 1,​
"PageSize": 10,​
"Filter": {​
"Ids": [​
"90b5a3da-3464-4718-92e4-039bf41d3cff"​
],​
"Name": "alert-rule-demo",​
"Type": "vmp/PromQL",​
"Status": "Running",​
"WorkspaceId": "e28ae750-bbb8-4ff4-abf4-1e0e0f88808c",​
"NotifyPolicyIds": [​
"e28ae750-bbb8-4ff4-abf4-1e0e0f88808c"​
],​
"NotifyGroupPolicyIds": [​
"e28ae750-bbb8-4ff4-abf4-1e0e0f88808c"​
]​
},​
"SortBy": "CreatedAt",​
"SortOrder": "Asc"​
}​
​
Response parameters​
​
Parameter​
Type​
Sample value​
Description​
Total​
Long​
100​
Total number of alerting rules.​
Items​
Array of AlertingRule​
-​
Alerting rule list.​
​
AlertingRule​
​
Parameter​
Type​
Sample value​
Description​
Id​
String​
90b5a3da-3464-4718-92e4-039bf41d3cff​
Alerting rule ID.​
CreateTime​
String​
2020-01-01T00:00:00Z​
The creation date of the alerting rule.​
UpdateTime​
String​
2020-01-01T00:00:00Z​
The update date of the alerting rule.​
Name​
String​
alert-rule-demo​
The name of the alerting rule.​
Description​
String​
this is a alert rule demo​
Description of the alerting rule.​
Type​
String​
vmp/PromQL​
Alerting rule type. Available value is vmp/PromQL.​
Query​
Object of AlertingRuleQuery​
-​
Alert configuration.​
Levels​
Array of AlertingRuleLevel​
-​
The alert level.​
NotifyPolicyId​
String​
e28ae750-bbb8-4ff4-abf4-1e0e0f88808c​
Alerting notification policy ID.​
NotifyGroupPolicyId​
String​
e28ae750-bbb8-4ff4-abf4-1e0e0f88808c​
Alerting aggregation policy ID.​
Status​
String​
Running​
Alerting rule status:​
  • Running: rules that are enabled​
  • Disabled: rules that are disabled​
Labels​
Array of TemplateKV​
-​
Labels to be added to the alert.​
Annotations​
Array of TemplateKV​
-​
Annotations added to the alert.​
​
AlertingRuleQuery​
​
Parameter​
Type​
Sample value​
Description​
WorkspaceId​
String​
e28ae750-bbb8-4ff4-abf4-1e0e0f88808c​
Workspace ID.​
PromQL​
String​
sum(up)​
Query statement.​
​
AlertingRuleLevel​
​
Parameter​
Type​
Sample value​
Description​
Level​
String​
P0​
Alerting rule level. Level P0, P1, and P2 are available currently.​
For​
String​
5m​
How long the state of meeting alerting conditions needs to last before raising alerts:​
  • 0s: raise immediately​
  • 1m: 1 minute​
  • 2m: 2 minutes​
  • 5m: 5 minutes​
  • 10m: 10 minutes​
Comparator​
String​
>​
Operators used in alerting rules:​
  • >: greater than​
  • >=: greater than or equal to​
  • <: less than​
  • <=: less than or equal to​
  • ==: equal to​
  • !=: not equal to​
Threshold​
Double​
1.0​
The threshold of the alert.​
​
TemplateKV​
​
Parameter​
Type​
Sample value​
Description​
Name​
String​
key1​
Key of label or annotation.​
Value​
String​
value1​
Value of label or annotation. Leaving it empty means the key will be deleted correspondingly.​
​
Sample responses​
​
HTTP/1.1: 200 OK​
Content-Type: application/json​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "ListAlertingRules",​
"Version": "2021-03-03",​
"Service": "vmp",​
"Region": "cn-beijing"​
},​
"Result": {​
"Total": 100,​
"Items": [​
{​
"Id": "e28ae750-bbb8-4ff4-abf4-1e0e0f88808c",​
"Name": "alert-rule-demo",​
"Description": "this is an alert rule demo",​
"Type": "vmp/PromQL",​
"Query": {​
"PromQL": "sum(up)",​
"WorkspaceId": "e28ae750-bbb8-4ff4-abf4-1e0e0f88808c"​
},​
"Levels": [​
{​
"For": "5m",​
"Level": "P0",​
"Threshold": 1,​
"Comparator": ">"​
}​
],​
"Labels": [​
{​
"Name": "key1",​
"Value": "value1"​
}​
],​
"annotations": [​
{​
"Name": "key1",​
"Value": "value1"​
}​
],​
"Status": "Running",​
"CreateTime": "2020-01-01T00:00:00Z",​
"UpdateTime": "2020-01-01T00:00:00Z",​
"NotifyPolicyId": "e28ae750-bbb8-4ff4-abf4-1e0e0f88808c",​
"NotifyGroupPolicyId": "e28ae750-bbb8-4ff4-abf4-1e0e0f88808c"​
}​
]​
}​
}​
​
Error codes​
The error codes for current API only are listed in the table below. See Public error codes to view error codes for any APIs.​
​
HTTP status codes​
Error codes​
Error message​
Description​
400​
InvalidParameter.{{parameter}}​
The specified parameter {{parameter}} is invalid.​
An invalid parameter was found. For example, an invalid workspace name was included in requests.​
403​
ProductUnsubscribed​
You are not subscribed to VMP. Please go to the VMP console web page to subscribe to the service​
The account is not subscribed to the VMP Service.​
​
​
Last updated: 2026.07.10 11:37:27