建议: 获取警报组和获取警报的分页版本的 API 规范
作者: qinxx108创建于 2023年5月11日更新于 2026年8月30日
- URL query parameters:
- maxResults Integer. The maximum number of alert groups to return in one getAlertGroupsInfo operation. The range is 1–1000. Optional
- nextToken String. The token for the next set of items to return. (You received this token from a previous call.). Optional
- filter An array of strings. A list of matchers to filter alert group by. Optional
- receiver String. A regular expression matching receivers to filter alerts by. Optional
- Sample response
groups: [
{
"labels": {
"group": "hello1"
},
"receiver": {
"name": "example-sns"
},
"route": "{ROUTE_UUID}"
},
{
"labels": {
"group": "hello2"
},
"receiver": {
"name": "example-sns"
},
"fingerprint": "{group_UUID}"
}
],
nextToken:"123"- URL query parameters:
- maxResults Integer. The maximum number of alerts to return in one getAlerts operation. The range is 1–1000. Optional
- nextToken String. The token for the next set of items to return. (You received this token from a previous call.). Optional
- active Boolean. If true, the returned list includes active alerts. The default is true. Optional
- silenced Boolean. If true, the returned list includes silenced alerts. The default is true. Optional
- inhibited Boolean. If true, the returned list includes inhibited alerts. The default is true. Optional
- unprocessed Boolean. If true, the returned list includes unprocessed alerts. The default is true. Optional
- filter An array of strings. A list of matchers to filter alerts by. Optional
- receiver String. A regular expression matching receivers to filter alerts by. Optional
- groupId String. The group id to filter alerts by. Optional
- Sample response
{
"alerts": [
{
"annotations": {
"summary": "this is a test alert used for demo purposes"
},
"endsAt": "2021-10-21T22:07:31.501Z",
"fingerprint": "375eab7b59892505",
"receivers": [
{
"name": "sns-0"
}
],
"startsAt": "2021-10-21T22:02:31.501Z",
"status": {
…内容来源: prometheus/alertmanager