Skip to content

Latest commit

 

History

History
200 lines (116 loc) · 9.05 KB

API.md

File metadata and controls

200 lines (116 loc) · 9.05 KB

API Reference

Classes

Name Description
ElasticacheAutoMonitor ElasticacheAutoMonitor allows you to send email, sms, slack, or trigger aws sns topic when an alarm occurs.
NodeType No description

Interfaces

Name Description
ISetUpWithLambdaProps Elasticache auto monitor set up with labmda props.
ISetUpWithSlackProps No description
ISetUpWithSmsProps No description

class ElasticacheAutoMonitor 🔹

ElasticacheAutoMonitor allows you to send email, sms, slack, or trigger aws sns topic when an alarm occurs.

You will get the following monitoring:

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

Reference: https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheMetrics.WhichShouldIMonitor.html

Implements: IConstruct, IConstruct, IConstruct, IDependable Extends: Construct

Initializer

new ElasticacheAutoMonitor(scope: Construct, id: string)
  • scope (Construct) No description
  • id (string) No description

Methods

static setUpWithLambda(scope, cacheClusterId, props)🔹

static setUpWithLambda(scope: Construct, cacheClusterId: string, props: ISetUpWithLambdaProps): void

static setUpWithSlack(scope, cacheClusterId, props)🔹

static setUpWithSlack(scope: Construct, cacheClusterId: string, props: ISetUpWithSlackProps): void

static setUpWithSms(scope, cacheClusterId, props)🔹

static setUpWithSms(scope: Construct, cacheClusterId: string, props: ISetUpWithSmsProps): void

class NodeType 🔹

Properties

Name Type Description
memory🔹 number
name🔹 string
vcupCount🔹 number
static DEFAULT🔹 NodeType
static M4_10XLARGE🔹 NodeType
static M4_2XLARGE🔹 NodeType
static M4_4XLARGE🔹 NodeType
static M4_LARGE🔹 NodeType
static M4_XLARGE🔹 NodeType
static M5_12XLARGE🔹 NodeType
static M5_24XLARGE🔹 NodeType
static M5_2XLARGE🔹 NodeType
static M5_4XLARGE🔹 NodeType
static M5_LARGE🔹 NodeType
static M5_XLARGE🔹 NodeType
static R4_16XLARGE🔹 NodeType
static R4_2XLARGE🔹 NodeType
static R4_4XLARGE🔹 NodeType
static R4_8XLARGE🔹 NodeType
static R4_LARGE🔹 NodeType
static R4_XLARGE🔹 NodeType
static R5_12XLARGE🔹 NodeType
static R5_24LARGE🔹 NodeType
static R5_2XLARGE🔹 NodeType
static R5_4XLARGE🔹 NodeType
static R5_LARGE🔹 NodeType
static R5_XLARGE🔹 NodeType
static T2_MEDIUM🔹 NodeType
static T2_MIRCO🔹 NodeType
static T2_SMALL🔹 NodeType
static T3_MEDIUM🔹 NodeType
static T3_MICRO🔹 NodeType
static T3_SMALL🔹 NodeType

interface ISetUpWithLambdaProps 🔹

Elasticache auto monitor set up with labmda props.

Properties

Name Type Description
lambda🔹 Function
currConnectionsPeriod?🔹 Duration The period over which the specified statistic is applied.
Default: Duration.minutes(1)
currConnectionsThreshold?🔹 number CurrConnections threshold.
Default: 100
nodeType?🔹 NodeType Default elasticache node type.
Default: NodeType.M5_LARGE

interface ISetUpWithSlackProps 🔹

Properties

Name Type Description
webHookUrl🔹 string Go to this(https://slack.com/apps/A0F7XDUAZ-incoming-webhooks) link to apply for webhook.
channel?🔹 string Setting channel.
Default: cloudwatch-alarm
currConnectionsPeriod?🔹 Duration The period over which the specified statistic is applied.
Default: Duration.minutes(1)
currConnectionsThreshold?🔹 number CurrConnections threshold.
Default: 100
iconEmoji?🔹 string Emoji for bot.
Default: 😱
nodeType?🔹 NodeType Default elasticache node type.
Default: NodeType.M5_LARGE
username?🔹 string Setting Slack bot name.
Default: Webhookbot

interface ISetUpWithSmsProps 🔹

Properties

Name Type Description
phones🔹 Array Include country code and phone number, for example: +15551231234.
currConnectionsPeriod?🔹 Duration The period over which the specified statistic is applied.
Default: Duration.minutes(1)
currConnectionsThreshold?🔹 number CurrConnections threshold.
Default: 100
nodeType?🔹 NodeType Default elasticache node type.
Default: NodeType.M5_LARGE