【问题标题】:Reading Metrics from StackDriver API (Google cloud)从 StackDriver API(谷歌云)读取指标
【发布时间】:2017-03-22 05:07:14
【问题描述】:

我想从计算引擎中读取以下指标。为此,我计划使用 StackDriver Monitoring API。阅读文档后,我知道 在向 API 发出 https 请求之前需要 OATH 2.0 授权。

我想用 python 编程,谁能告诉我怎么做 获取 oath 2.0 的授权并获取用于发出请求的访问令牌。

例如: 实例/磁盘/read_bytes_count 实例/磁盘/write_bytes_count

【问题讨论】:

    标签: google-compute-engine stackdriver


    【解决方案1】:

    有可用于 Python 的 OAuth2 客户端库(例如 this one)。但是,您可能会发现使用专门用于 Stackdriver Monitoring API 的客户端库会更容易,例如 https://pypi.python.org/pypi/google-cloud-monitoring

    【讨论】:

      猜你喜欢
      • 2016-12-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-16
      • 1970-01-01
      • 1970-01-01
      • 2018-01-10
      相关资源
      最近更新 更多