cdk-elasticache-monitor
TypeScript icon, indicating that this package has built-in type declarations

0.0.13 • Public • Published

Welcome to cdk-elasticache-monitor

ElasticacheAutoMonitor allows you to send email, sms, slack, or trigger aws lambda when an alarm occurs. You will get the following monitoring:

  • Cpu Monitor: Should be less than 90%. (See below reference)
  • SwapUsage Monitor: Should be less than 50M.
  • Evictions Monitor: Should not have evictions value.
  • CurrConnections Monitor: According to your business needs, default every 1 vcup is equal to 200 connections.
  • FreeableMemory Monitor: Not less than 10%

Reference: Here

Usage

 
const stack = new cdk.Stack();
 
// or sent with sms
ElasticacheAutoMonitor.setUpWithSms(stack, 'my-elasticache-id', {
  phones: ['+15533728278'],
  nodeTypeClass: NodeType.R4_16XLARGE,
});
 
// or sent with slack
ElasticacheAutoMonitor.setUpWithSlack(stack, 'my-elasticache-id', {
  webHookUrl: 'http://xxx.xxx.xxx',
  nodeTypeClass: NodeType.R4_16XLARGE,
});
 
// or trigger lambda
const fn = new lambda.Function(stack, 'MyFunction', {
  runtime: lambda.Runtime.NODEJS_10_X,
  handler: 'index.handler',
  code: lambda.Code.fromInline('exports.handler = function(event, ctx, cb) { return cb(null, "hi"); }'),
});
ElasticacheAutoMonitor.setUpWithLambda(stack, 'my-elasticache-id', fn, {
  nodeTypeClass: NodeType.R4_16XLARGE,
});

Package Sidebar

Install

npm i cdk-elasticache-monitor

Weekly Downloads

15

Version

0.0.13

License

Apache-2.0

Unpacked Size

132 kB

Total Files

20

Last publish

Collaborators

  • jialechan