You need to enable JavaScript to run this app.
文档中心
托管 Prometheus

托管 Prometheus

复制全文
下载 pdf
查看告警
ListAlertSamples
复制全文
下载 pdf
ListAlertSamples
获取告警样本列表。​
请求说明​
托管 Prometheus 已在全球多个地域部署服务,旨在为您提供更稳定、低延迟的访问体验。您可以通过查阅 服务地址 文档,根据业务所在地域,选择最合适的接入点。​
  • 请求方式:POST​
  • 请求地址:https://vmp.cn-beijing.volcengineapi.com?Action=ListAlertSamples&Version=2021-03-03​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
​
参数​
类型​
是否必选​
示例值​
描述​
Action​
String​
是​
ListAlertSamples​
接口名称。当前 API 的名称为 ListAlertSamples。​
Version​
String​
是​
2021-03-03​
接口版本。当前 API 的版本为 2021-03-03。​
Limit​
Long​
否​
100​
告警记录序列样本个数限制,默认值 100,最大值 500。​
Filter​
Object of AlertSampleFilter​
是​
-​
告警样本过滤。​
​
AlertSampleFilter​
​
参数​
类型​
是否必选​
示例值​
描述​
AlertId​
String​
是​
e28ae750-bbb8-4ff4-abf4***​
按告警样本 ID 过滤。​
SampleSince​
Long​
否​
1600885800​
按告警开始时间过滤。​
SampleUntil​
Long​
否​
1600885800​
按告警结束时间过滤。​
​
请求示例​
​
POST https://vmp.cn-beijing.volcengineapi.com?Action=ListAlertSamples&Version=2021-03-03​
Content-Type: application/json​
{​
"Limit": 100,​
"Filter": {​
"AlertId": "e28ae750-bbb8-4ff4-abf4***",​
"SampleSince": 1600885800,​
"SampleUntil": 1600885800​
}​
}
​
返回参数​
​
参数​
类型​
示例值​
描述​
Total​
Long​
100​
告警样本总数。​
Items​
Array of AlertSample​
-​
告警样本列表。​
​
AlertSample​
​
参数​
类型​
示例值​
描述​
AlertId​
String​
e28ae750-bbb8-4ff4-abf4***​
告警样本 ID。​
Timestamp​
Long​
1686232540​
告警样本时间戳,unix_timestamp 类型。​
Phase​
String​
Active​
告警样本状态,取值:​
  • Pending:达到告警阈值但未满告警持续时间​
  • Active:告警中​
  • Resolved:自然解除​
  • Disabled:人工解除​
Level​
String​
P0​
告警样本等级,包括:P0、P1 和 P2。​
Value​
Double​
123.123​
告警规则的 PromQL 语句下查询到的当前值。​
​
返回示例​
​
HTTP/1.1: 200 OK​
Content-Type: application/json​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "ListAlertSamples",​
"Version": "2021-03-03",​
"Service": "vmp",​
"Region": "cn-beijing"​
},​
"Result": {​
"Total": 100,​
"Items": [​
{​
"Level": "P0",​
"Phase": "Active",​
"Value": 123.123,​
"AlertId": "e28ae750-bbb8-4ff4-abf4***",​
"Timestamp": 1686232540​
}​
]​
}​
}
​
错误码​
本接口错误码如下表所示,公共错误码请参见 公共错误码。​
​
HTTP 状态码​
错误码​
错误信息​
说明​
400​
InvalidParameter.{{parameter}}​
The specified parameter {{parameter}} is invalid.​
输入不合法,如工作区名称不合法等。​
403​
ProductUnsubscribed​
You are not subscribed to VMP. Please go to the VMP console web page to subscribe to the service​
当前账号未订阅 VMP 服务。​
​
最近更新时间:2025.11.05 17:12:26
这个页面对您有帮助吗?
有用
有用
无用
无用