答案 0 :(得分:1)
目前无法生成此类指标/图表来显示 VM 的正常运行时间百分比。
您可以尝试使用 cloud trace API 提取该信息。
另一种方法可能是使用 MQL 查询来创建自定义指标,以显示按小时/天等汇总的总正常运行时间。
fetch gce_instance
| metric 'compute.googleapis.com/instance/uptime'
| filter (metric.instance_name == 'instance-1')
| align delta(1d)
| every 1d
| group_by [], [value_uptime_mean: mean(value.uptime)]
此外,您可能会发现这些答案很有帮助:
How to generate uptime reports through Google Cloud Stackdriver?
How to get uptime total and percentage of GCP compute vm instance through MQL?
Get google cloud uptime history to a third party application