我正在尝试查找 API 以获取我在 GCP 上创建的特定警报策略的事件。当达到阈值时,我能够收到电子邮件,但我找不到使用[postman][1]获取该事件的方法。我找到了获取我在 GCP 上创建的策略的 API,但不是生成的事件。任何帮助表示赞赏。
已编辑:我为警报策略 API ( https://monitoring.googleapis.com/v3/projects/{projectId}/alertPolicies/{alertId} ) 获得的 Json 响应如下所示
{ “name”:“projects/{projectId}/alertPolicies/{alertId}”,“displayName”:“节点上的最大内存利用率”,“combiner”:“OR”,“creationRecord”:{“mutateTime”:“ 2021-03-02T18:05:21.054509916Z”、“mutatedBy”:“myemail”}、“mutationRecord”:{“mutateTime”:“2021-08-09T16:24:50.941114533Z”、“mutatedBy”:“myemail” }, "条件": [ { "conditionThreshold": { "filter": "resource.type = "gce_instance" AND metric.type = "compute.googleapis.com/guest/memory/bytes_used"", "comparison": " COMPARISON_GT", "thresholdValue": 5, "duration": "0s", "trigger": { "count": 1 },“聚合”:[{“alignmentPeriod”:“60s”,“perSeriesAligner”:“ALIGN_MEAN”,“crossSeriesReducer”:“REDUCE_MAX”,“groupByFields”:[“metric.label.instance_name”]}]},“displayName” : "Memorystore Memcached 节点 - 内存使用量 [MAX]", "name": "projects/{projectId}/alertPolicies/{alertId}/conditions/14902542656838734365" } ], "notificationChannels": [ "projects/{projectId}/notificationChannels /17463875491346552338" ], "启用": true, "alertStrategy": {} }label.instance_name" ] } ] }, "displayName": "Memorystore Memcached 节点 - 内存使用 [MAX]", "name": "projects/{projectId}/alertPolicies/{alertId}/conditions/14902542656838734365" } ], " notificationChannels": ["projects/{projectId}/notificationChannels/17463875491346552338"], "enabled": true, "alertStrategy": {} }label.instance_name" ] } ] }, "displayName": "Memorystore Memcached 节点 - 内存使用 [MAX]", "name": "projects/{projectId}/alertPolicies/{alertId}/conditions/14902542656838734365" } ], " notificationChannels": ["projects/{projectId}/notificationChannels/17463875491346552338"], "enabled": true, "alertStrategy": {} }
但这只是政策