CreateAlertManagerAlerts - Amazon Managed Service for Prometheus

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

CreateAlertManagerAlerts

CreateAlertManagerAlerts 作業會在工作區中建立警示。

有效的 HTTP 動詞:

POST

有效 URI:

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

URL 查詢參數:

alerts 物件陣列,其中每個物件代表一個警示。以下是警示物件路徑的範例:

[ { "startsAt": "2021-09-24T17:14:04.995Z", "endsAt": "2021-09-24T17:14:04.995Z", "annotations": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }, "labels": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }, "generatorURL": "string" } ]

請求範例

POST /workspaces/ws-b226cc2a-a446-46a9-933a-ac50479a5568/alertmanager/api/v2/alerts HTTP/1.1 Content-Length: 203, Authorization: AUTHPARAMS X-Amz-Date: 20201201T193725Z User-Agent: Grafana/8.1.0 [ { "labels": { "alertname": "test-alert" }, "annotations": { "summary": "this is a test alert used for demo purposes" }, "generatorURL": "https://www.amazon.com/" } ]

回應範例

HTTP/1.1 200 OK x-amzn-RequestId: 12345678-abcd-4442-b8c5-262b45e9b535 Content-Length: 0 Connection: keep-alive Date: Tue, 01 Dec 2020 19:37:25 GMT Content-Type: application/json Server: amazon vary: Origin