turbot/gcp_insights

Query: sql_database_instance_cpu_utilization

Usage

powerpipe query gcp_insights.query.sql_database_instance_cpu_utilization

SQL

select
timestamp,
(sum / 300) as cpu_utilization
from
gcp_sql_database_instance_metric_cpu_utilization
where
timestamp >= current_date - interval '7 day'
and split_part(instance_id, ':', 2) in (select name from gcp_sql_database_instance where self_link = $1 and project = split_part($1, '/', 7))
order by
timestamp;

Dashboards

The query is used in the dashboards: