ListAlertManagerAlertGroups - Amazon Managed Service for Prometheus

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

ListAlertManagerAlertGroups

ListAlertManagerAlertGroups 操作检索工作区警报管理器中配置的警报组列表。

有效的 HTTP 动词:

GET

有效的 URI:

/workspaces/workspaceId/alertmanager/api/v2/alerts/groups

URL 查询参数:

active 布尔值。如果为 true,则返回的列表包括活动警报。默认值为 true。可选

silenced 布尔值。如果为 true,则返回的列表包括静默警报。默认值为 true。可选

inhibited 布尔值。如果为 true,则返回的列表包括抑制的警报。默认值为 true。可选

filter 字符串数组。用于筛选警报的匹配器列表。可选

receiver 字符串。匹配接收方以筛选警报的正则表达式。可选

示例请求

GET /workspaces/ws-b226cc2a-a446-46a9-933a-ac50479a5568/alertmanager/api/v2/alerts/groups HTTP/1.1 Content-Length: 0, Authorization: AUTHPARAMS X-Amz-Date: 20201201T193725Z User-Agent: Grafana/8.1.0

示例响应

HTTP/1.1 200 OK x-amzn-RequestId: 12345678-abcd-4442-b8c5-262b45e9b535 Content-Length: 443 Connection: keep-alive Date: Tue, 01 Dec 2020 19:37:25 GMT Content-Type: application/json Server: amazon vary: Origin [ { "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": { "inhibitedBy": [], "silencedBy": [], "state": "unprocessed" }, "updatedAt": "2021-10-21T22:02:31.501Z", "generatorURL": "https://www.amazon.com/", "labels": { "alertname": "test-alert" } } ], "labels": {}, "receiver": { "name": "sns-0" } } ]