问题
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?
I reviewed already the Default Logging Agent logs doc which shows what Stackdriver Logging collects but RAM and CPU usage isn't mentioned.
I also found this Viewing Activity Logs and Exporting with the Logs Viewer but none of them are relevant to my need.
Thanks in advance
回答1:
Stackdriver has some specific GCP metrics - no need for custom types (those on the "default logging aggent logs" linked in the question):
- https://cloud.google.com/monitoring/api/metrics_gcp#gcp-compute
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.
来源:https://stackoverflow.com/questions/51773144/gce-ram-and-cpu-usage-in-bigquery