AWS ElastiCache Utilization Checker
Number of APIs: 4
This collection recommends which Caches Clusters in AWS ElastiCache are inactive in a given range of time with few externally specified constraints. It uses CloudWatch to get the statistics of clusters and currently is based on 3 metrics:
- CacheHits
- CPUUtilization
- CurrItems
Setup
You need to set the following environment variables:
AWS Credentials
a.
accessKeyID
b.
secretAccessKey
slackWebHookURL
Description: Collection notifies its results on this webhook.
region
Description: AWS region to monitor - Ex:
us-east-1
days
Description: Range to monitor clusters starting from today to back N days
period
Description: Time interval in which AWS collects data points and aggregates them. Ex: 36000 (seconds)
Miscellaneous
AWS allows 1440 data points in a single request. Either make period long or days short so that data points aggregated are less than their limit.
Parameters below have default values in case not mentioned in the environment. You can modify these in the environment if required. However, these are recommended.
Variable Name | Default Value |
---|---|
days | 14 |
period | 36000 |
region | us-east-1 |
-
Get all clusters of a region GET https://elasticache.{{region}}.amazonaws.com/?Action=DescribeCacheClusters&MaxRecords=100&ShowCacheNodeInfo=false&Version=2015-02-02
-
Get CacheHits Statistics GET http://monitoring.amazonaws.com/?Action=GetMetricStatistics&SignatureVersion=4&Version=2010-08-01&StartTime={{startTime}}&EndTime={{endTime}}&Period={{period}}&Statistics.member.1=Average&Dimensions.member.1.Name=CacheClusterId&Dimensions.member.1.Value={{cacheClusterId}}&MetricName=CacheHits&Namespace=AWS%2FElastiCache
-
Get CPUUtilization Statistics GET http://monitoring.amazonaws.com/?Action=GetMetricStatistics&SignatureVersion=4&Version=2010-08-01&StartTime={{startTime}}&EndTime={{endTime}}&Period={{period}}&Statistics.member.1=Average&Dimensions.member.1.Name=CacheClusterId&Dimensions.member.1.Value={{cacheClusterId}}&MetricName=CPUUtilization&Namespace=AWS%2FElastiCache
-
Get CurrentItems Statistics GET http://monitoring.amazonaws.com/?Action=GetMetricStatistics&SignatureVersion=4&Version=2010-08-01&StartTime={{startTime}}&EndTime={{endTime}}&Period={{period}}&Statistics.member.1=Sum&Dimensions.member.1.Name=CacheClusterId&Dimensions.member.1.Value={{cacheClusterId}}&MetricName=CurrItems&Namespace=AWS%2FElastiCache