turbot/tailpipe-mod-aws-vpc-flow-log-detections

Query: Accepted vs. Rejected Traffic

Description

Comparison of accepted and rejected record counts.

Usage

powerpipe query aws_vpc_flow_log_detections.query.activity_dashboard_accepted_rejected_traffic

Tailpipe Tables

SQL

with time_series as (
select
date_trunc('day', start_time) as day,
count(*) filter (where action = 'ACCEPT') as accepted,
count(*) filter (where action = 'REJECT') as rejected
from
aws_vpc_flow_log
group by
day
order by
day
)
select
day,
accepted,
rejected
from
time_series
order by
day;

Dashboards

The query is used in the dashboards: