如何将 Stackdriver 图表转换为 csv 文件?
How to get the Stackdriver charts into a csv file?
我正在使用 Stackdriver 监控 GCP 中部署在 Kubernetes 中的集群。在 Stackdriver 监控概览选项卡中,我能够看到显示资源利用率与时间的不同图表。我想将此图表转换为包含每秒资源利用率的 csv 文件。有没有人以前做过这个或知道如何做?
Stackdriver 中没有内置 "easy" 方法来将指标导出到 .csv 文件。
可能 "easiest" 方法是在 github 上使用这个项目,这是一个 Google App Engine 服务导出到 .csv 文件。它在 Alpha 中,您需要安装它。
https://github.com/CloudMile/stackdriver-monitoring-exporter
此处介绍了推荐的导出方式。 https://cloud.google.com/solutions/stackdriver-monitoring-metric-export
并且此方法适用于将大量指标数据存档以供以后比较,而不是真正用于电子表格中的少量数据。
推荐的方式需要使用监控API
(https://cloud.google.com/monitoring/custom-metrics/reading-metrics)
其中 returns JSON,您必须将其转换为 .csv 文件。你可能会找 curl 或邮递员来打电话。
这是 github 上的另一个示例项目。不过,这会将数据发送到 bigquery 进行存储。
https://github.com/GoogleCloudPlatform/stackdriver-metrics-export
我正在使用 Stackdriver 监控 GCP 中部署在 Kubernetes 中的集群。在 Stackdriver 监控概览选项卡中,我能够看到显示资源利用率与时间的不同图表。我想将此图表转换为包含每秒资源利用率的 csv 文件。有没有人以前做过这个或知道如何做?
Stackdriver 中没有内置 "easy" 方法来将指标导出到 .csv 文件。
可能 "easiest" 方法是在 github 上使用这个项目,这是一个 Google App Engine 服务导出到 .csv 文件。它在 Alpha 中,您需要安装它。 https://github.com/CloudMile/stackdriver-monitoring-exporter
此处介绍了推荐的导出方式。 https://cloud.google.com/solutions/stackdriver-monitoring-metric-export 并且此方法适用于将大量指标数据存档以供以后比较,而不是真正用于电子表格中的少量数据。
推荐的方式需要使用监控API (https://cloud.google.com/monitoring/custom-metrics/reading-metrics) 其中 returns JSON,您必须将其转换为 .csv 文件。你可能会找 curl 或邮递员来打电话。
这是 github 上的另一个示例项目。不过,这会将数据发送到 bigquery 进行存储。 https://github.com/GoogleCloudPlatform/stackdriver-metrics-export