standard
turbot/aws_thrifty
- Detect & correct DynamoDB table with stale data
- Detect & correct EBS snapshots exceeding max age
- Detect & correct EBS volumes attached to stopped instances
- Detect & correct EBS volumes exceeding max size
- Detect & correct EBS volumes if unattached
- Detect & correct EBS volumes using gp2
- Detect & correct EBS volumes using io1
- Detect & correct EBS volumes with low IOPS
- Detect & correct EBS volumes with low usage
- Detect & correct EC2 application load balancers if unused
- Detect & correct EC2 classic load balancers if unused
- Detect & correct EC2 gateway load balancers if unused
- Detect & correct EC2 instances exceeding max age
- Detect & correct EC2 instances large
- Detect & correct EC2 instances of older generation
- Detect & correct EC2 instances without graviton
- Detect & correct EC2 network load balancers if unused
- Detect & correct EKS node groups without graviton
- Detect & correct Elasticache clusters exceeding max age
- Detect & correct EMR Clusters idle 30 mins
- Detect & correct Lambda functions without graviton
- Detect & correct RDS DB instances exceeding max age
- Detect & correct RDS DB instances of older generation
- Detect & correct RDS DB instances with low connection count
- Detect & correct RDS DB instances without graviton processor
- Detect & correct Route53 health checks if unused
- Detect & correct Route53 records with lower TTL
- Detect & correct S3 buckets without lifecycle policy
- Detect & correct SecretsManager secrets if unused
- Detect & correct VPC EIPs if unattached
- Detect & correct VPC NAT gateways if unused
Get Involved
Version
Overview
EBS volumes with low usage may be indicative that they're no longer required, these should be reviewed.
This query trigger detects EBS volumes with low average usage and then either sends a notification or attempts to perform a predefined corrective action.
Getting Started
By default, this trigger is disabled, however it can be configured by setting the below variables
ebs_volumes_with_low_usage_trigger_enabled
should be set totrue
as the default isfalse
.ebs_volumes_with_low_usage_trigger_schedule
should be set to your desired running scheduleebs_volumes_with_low_usage_default_action
should be set to your desired action (i.e."notify"
for notifications or"delete_volume"
to update the volume).
Then starting the server:
flowpipe server
or if you've set the variables in a .fpvars
file:
flowpipe server --var-file=/path/to/your.fpvars
Query
with ebs_usage as ( select account_id, sp_connection_name, region, volume_id, round(avg(max)) as avg_max from ( ( select partition, account_id, sp_connection_name, region, volume_id, cast(maximum as numeric) as max from aws_ebs_volume_metric_read_ops_daily where date_part('day', now() - timestamp) <= 30 ) union ( select partition, account_id, sp_connection_name, region, volume_id, cast(maximum as numeric) as max from aws_ebs_volume_metric_write_ops_daily where date_part('day', now() - timestamp) <= 30 ) ) as read_and_write_ops group by 1, 2, 3, 4, 5)select concat(volume_id, ' [', region, '/', account_id, ']') as title, volume_id, region, sp_connection_name as connfrom ebs_usagewhere avg_max <= 100 :: int
Schedule
15m
Tags
category = Cost
class = unused
plugin = aws
service = AWS/EBS