【问题标题】:Google Cloud Platform quotas monitoring (alerting)Google Cloud Platform 配额监控(提醒)
【发布时间】:2018-04-11 07:35:25
【问题描述】:

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

例如,当任何服务的配额容量小于 20% 时,我需要配置案例警报。有没有人做过类似的事情?也许谷歌云有一些标准工具?如果没有,是否可以使用 python + gcloud 模块?

【问题讨论】:

    标签: python google-cloud-platform gcloud


    【解决方案1】:

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

    gcloud compute project-info describe --project myproject
    

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

    【讨论】:

    • 不幸的是,它没有收到有关配额的所有信息。我之前已经尝试过...例如,我在输出中找不到空闲 CPU。但是,无论如何感谢您的回答!
    • 检查 CPUS_ALL_REGIONS 字段。
    猜你喜欢
    • 1970-01-01
    • 2020-05-23
    • 1970-01-01
    • 2020-02-09
    • 1970-01-01
    • 2016-02-19
    • 2017-10-14
    • 2016-04-08
    • 1970-01-01
    相关资源
    最近更新 更多