在 GCP 上达到配额 API 限制时设置警报 [英] Set an alert when quota API limit is reached on GCP

查看:58
本文介绍了在 GCP 上达到配额 API 限制时设置警报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法设置 Stackdriver 在我的任何 Google API 使用量达到限制时接收警报?

Is there a way to setup Stackdriver to receive an alert when ANY of my Google APIs usage have reached its limit?

我曾经在 https://console.cloud.google.com 上手动检查/iam-admin/quotas 但我不知道如何自动收到警报.

I used to manually check at https://console.cloud.google.com/iam-admin/quotas but I can't figure out how to be automatically alerted.

推荐答案

看起来你至少可以通过 Stackdriver 做一些事情.打开 Stackdriver Monitoring 并使用 Metrics Explorer.搜索Consumer Quota"作为资源并选择您的指标.它将显示所有启用的 API.找到您的 API 并添加过滤器.

It looks like you can do at least some through Stackdriver. Open Stackdriver Monitoring and use theMetrics Explorer. Search for "Consumer Quota" as the resource and choose your metric. It'll display all the APIs enabled. Locate your API and add a filter.

例如,我想监控 Vision API 地标检测调用,因此我的过滤器为 quota_metric,值为vision.googleapis.com/landmark_detection_requests".了解所需的过滤器后,您应该能够创建警报.

For example, I wanted to monitor Vision API landmark detection calls so my filter was quota_metric and the value was "vision.googleapis.com/landmark_detection_requests". Once you know the filter you need, you should be able to create an alert.

看看你过得怎么样.

这篇关于在 GCP 上达到配额 API 限制时设置警报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆