Skip to content

Instantly share code, notes, and snippets.

@kapilt
Created June 24, 2016 13:01
Show Gist options
  • Select an option

  • Save kapilt/72c23ed0fc04cdf4566415dd2d6d95bb to your computer and use it in GitHub Desktop.

Select an option

Save kapilt/72c23ed0fc04cdf4566415dd2d6d95bb to your computer and use it in GitHub Desktop.
custodian metrics filters
Metrics Filters
---------------
Supports cloud watch metrics filters on resources.
Docs on cloud watch metrics
- GetMetricStatistics - http://goo.gl/w8mMEY
- Supported Metrics - http://goo.gl/n0E0L7
usage:: yaml
- name: ec2-underutilized
filters:
- type: metric
name: CPUUtilization
days: 4
period: 86400
value: 30
op: less-than
Note periods when a resource is not sending metrics are not part
of calculated statistics as in the case of a stopped ec2 instance,
nor for resources to new to have existed the entire
period. ie. being stopped for an ec2 intsance wouldn't lower the
average cpu utilization,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment