Google Cloud Platform配额监控(警报)

时间:2018-04-11 07:35:25

标签: python google-cloud-platform gcloud

我对配额监控有疑问(我的意思是https://console.cloud.google.com中的配额 - > IAM& admin - > Quotas)。

例如,当任何服务的配额容量小于20%时,我需要对案例进行配置警报。有没有人这样做过?也许Google Cloud有一些标准的工具吗?如果没有,是否可以使用python + gcloud模块?

1 个答案:

答案 0 :(得分:1)

如果您对计算引擎配额感兴趣,可以使用Google Cloud标准工具使用this API call列出它们。或者找到here用于列出它们的CLI命令,格式为:

gcloud compute project-info describe --project myproject

您可以使用cron job执行常规计划任务,调用API并验证是否符合usage/limit<0.8条件。