cdk-monitoring-constructs icon indicating copy to clipboard operation
cdk-monitoring-constructs copied to clipboard

[elasticache] More metrics/alarming support for Redis

Open echeung-amzn opened this issue 2 years ago • 3 comments

Relevant metrics:

  • DatabaseMemoryUsagePercentage
  • CurrConnections
  • StringBasedCmdsLatency

Docs:

  • https://aws.amazon.com/blogs/database/monitoring-best-practices-with-amazon-elasticache-for-redis-using-amazon-cloudwatch
  • https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheMetrics.Redis.html

echeung-amzn avatar Mar 08 '22 21:03 echeung-amzn

We have to decide whether we want to always show these metrics (e.g. in an extra row) or add a flag to show them (e.g. enableDetailedMetrics?). We already know the engine type, since it is a monitoring parameter.

voho avatar Mar 16 '22 06:03 voho

Hello, I'd like to tackle this issue if possible. I'd be happy to groom & work on the issue with assistance, thanks!

matiaslagoevia avatar Mar 18 '23 00:03 matiaslagoevia

Sure!

The relevant files you'll likely be touching include:

  • https://github.com/cdklabs/cdk-monitoring-constructs/blob/main/lib/monitoring/aws-elasticache/ElastiCacheClusterMetricFactory.ts: functions for getting the relevant metrics
  • https://github.com/cdklabs/cdk-monitoring-constructs/blob/main/lib/monitoring/aws-elasticache/ElastiCacheClusterMonitoring.ts: where the metrics are used for dashboard and alarm purposes
  • https://github.com/cdklabs/cdk-monitoring-constructs/tree/main/test/monitoring/aws-elasticache: correponding test files

The existing code should be representative of the relevant patterns with other metrics, but let us know if you have any questions!

echeung-amzn avatar Mar 20 '23 14:03 echeung-amzn