turbot/aws_insights

Query: cloudwatch_log_metric_filters_for_cloudwatch_log_group

Usage

powerpipe query aws_insights.query.cloudwatch_log_metric_filters_for_cloudwatch_log_group

SQL

with filtered_log_group as (
select
arn,
name,
region,
account_id
from
aws_cloudwatch_log_group
where
arn = $1
and region = split_part($1, ':', 4)
and account_id = split_part($1, ':', 5)
)
select
f.name as log_metric_filter_name
from
filtered_log_group g
left join aws_cloudwatch_log_metric_filter f on g.name = f.log_group_name and g.region = f.region and g.account_id = f.account_id;