turbot/gcp

steampipe plugin install gcpsteampipe plugin install gcp
gcp_audit_policygcp_bigquery_datasetgcp_bigquery_jobgcp_bigquery_tablegcp_bigtable_instancegcp_cloudfunctions_functiongcp_compute_addressgcp_compute_backend_bucketgcp_compute_backend_servicegcp_compute_diskgcp_compute_disk_metric_read_opsgcp_compute_disk_metric_read_ops_dailygcp_compute_disk_metric_read_ops_hourlygcp_compute_disk_metric_write_opsgcp_compute_disk_metric_write_ops_dailygcp_compute_disk_metric_write_ops_hourlygcp_compute_firewallgcp_compute_forwarding_rulegcp_compute_global_addressgcp_compute_global_forwarding_rulegcp_compute_imagegcp_compute_instancegcp_compute_instance_metric_cpu_utilizationgcp_compute_instance_metric_cpu_utilization_dailygcp_compute_instance_metric_cpu_utilization_hourlygcp_compute_instance_templategcp_compute_machine_typegcp_compute_networkgcp_compute_node_groupgcp_compute_node_templategcp_compute_project_metadatagcp_compute_regiongcp_compute_resource_policygcp_compute_routergcp_compute_snapshotgcp_compute_ssl_policygcp_compute_subnetworkgcp_compute_target_https_proxygcp_compute_target_poolgcp_compute_target_ssl_proxygcp_compute_target_vpn_gatewaygcp_compute_url_mapgcp_compute_vpn_tunnelgcp_compute_zonegcp_dns_managed_zonegcp_dns_policygcp_dns_record_setgcp_iam_policygcp_iam_rolegcp_kms_keygcp_kms_key_ringgcp_logging_bucketgcp_logging_exclusiongcp_logging_metricgcp_logging_sinkgcp_monitoring_alert_policygcp_monitoring_groupgcp_monitoring_notification_channelgcp_organizationgcp_projectgcp_project_organization_policygcp_project_servicegcp_pubsub_snapshotgcp_pubsub_subscriptiongcp_pubsub_topicgcp_service_accountgcp_service_account_keygcp_sql_backupgcp_sql_databasegcp_sql_database_instancegcp_sql_database_instance_metric_connectionsgcp_sql_database_instance_metric_connections_dailygcp_sql_database_instance_metric_connections_hourlygcp_sql_database_instance_metric_cpu_utilizationgcp_sql_database_instance_metric_cpu_utilization_dailygcp_sql_database_instance_metric_cpu_utilization_hourlygcp_storage_bucket

Table: gcp_compute_instance_metric_cpu_utilization

Google Monitoring Metrics provide data about the performance of your systems. The gcp_compute_instance_metric_cpu_utilization table provides metric statistics at 5 minute intervals for the most recent 5 days.

Examples

Basic info

select
name,
timestamp,
minimum,
maximum,
average,
sample_count
from
gcp_compute_instance_metric_cpu_utilization
order by
name,
timestamp;

CPU Over 80% average

select
name,
timestamp,
round(minimum::numeric,2) as min_cpu,
round(maximum::numeric,2) as max_cpu,
round(average::numeric,2) as avg_cpu,
sample_count
from
gcp_compute_instance_metric_cpu_utilization
where average > 80
order by
name,
timestamp;

.inspect gcp_compute_instance_metric_cpu_utilization

GCP Compute Instance Metrics - CPU Utilization

NameTypeDescription
averagedouble precisionThe average of the metric values that correspond to the data point.
locationtextThe GCP multi-region, region, or zone in which the resource is located.
maximumdouble precisionThe maximum metric value for the data point.
metadatajsonbThe associated monitored resource metadata.
metric_kindtextThe metric type.
metric_labelsjsonbThe set of label values that uniquely identify this metric.
metric_typetextThe associated metric. A fully-specified metric used to identify the time series.
minimumdouble precisionThe minimum metric value for the data point.
nametextThe name of the instance.
projecttextThe GCP Project in which the resource is located.
resourcejsonbThe associated monitored resource.
sample_countdouble precisionThe number of metric values that contributed to the aggregate value of this data point.
sumdouble precisionThe sum of the metric values for the data point.
timestamptimestamp without time zoneThe time stamp used for the data point.
unittextThe data points of this time series. When listing time series, points are returned in reverse time order.When creating a time series, this field must contain exactly one point and the point's type must be the same as the value type of the associated metric. If the associated metric's descriptor must be auto-created, then the value type of the descriptor is determined by the point's type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION.