问题描述
有没有一种方法可以将Google Compute Engine实例日志导出到BigQuery中,从而允许您使用实例标签查询导出的日志以获取选定时段内的CPU和RAM使用率?
Is there a way to export Google Compute Engine instances logs into BigQuery which will allow you to query the exported logs to get CPU and RAM usage for a selected period using the instance label?
我已经查看了默认日志记录代理日志文档其中显示了Stackdriver Logging收集的内容,但未提及RAM和CPU使用率.
I reviewed already the Default Logging Agent logs doc which shows what Stackdriver Logging collects but RAM and CPU usage isn't mentioned.
我还找到了查看活动日志和与Logs Viewer一起导出,但是它们都不符合我的需求.
I also found this Viewing Activity Logs and Exporting with the Logs Viewer but none of them are relevant to my need.
预先感谢
推荐答案
Stackdriver具有一些特定的GCP指标-不需要自定义类型(问题中链接的默认日志记录敏捷日志"中的类型):
Stackdriver has some specific GCP metrics - no need for custom types (those on the "default logging aggent logs" linked in the question):
它们包括 instance/cpu/utilization
和其他cpu指标.我不确定为什么未列出内存,因为它是许多其他服务(在同一页面中)默认报告的一部分.
They include instance/cpu/utilization
and other cpu metrics. I'm not sure why memory is not listed, as it's part of many other services (in the same page) default reporting.
这篇关于BigQuery中的GCE RAM和CPU使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!