turbot/gcp_insights

Query: sql_database_instance_connection

Usage

powerpipe query gcp_insights.query.sql_database_instance_connection

SQL

select
timestamp,
(sum / 300) as instance_connection
from
gcp_sql_database_instance_metric_connections
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: