ElasticacheAutoMonitor allows you to send email, sms, slack, or trigger aws lambda when an alarm occurs.
Project description
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: https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheMetrics.WhichShouldIMonitor.html
Usage
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
stack = cdk.Stack()
# sent with email
ElasticacheAutoMonitor.set_up_with_email(stack, "my-elasticache-id",
emails=["jiale.chan@gmail.com"],
node_type_class=NodeType.R4_16XLARGE
)
# or sent with sms
ElasticacheAutoMonitor.set_up_with_sms(stack, "my-elasticache-id",
phones=["+15533728278"],
node_type_class=NodeType.R4_16XLARGE
)
# or sent with slack
ElasticacheAutoMonitor.set_up_with_slack(stack, "my-elasticache-id",
web_hook_url="http://xxx.xxx.xxx",
node_type_class=NodeType.R4_16XLARGE
)
# or trigger lambda
fn = lambda.Function(stack, "MyFunction",
runtime=lambda.Runtime.NODEJS_10_X,
handler="index.handler",
code=lambda.Code.from_inline("exports.handler = function(event, ctx, cb) { return cb(null, \"hi\"); }")
)
ElasticacheAutoMonitor.set_up_with_lambda(stack, "my-elasticache-id", fn,
node_type_class=NodeType.R4_16XLARGE
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for cdk-elasticache-monitor-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fa3dd2e1b28fc74370a71dae2e98029734b2db4bb4d7ba7b43299ef20940a8c |
|
MD5 | 4cc1139450a8bc22343b1eae165d42de |
|
BLAKE2b-256 | 6901c49be6ccc9d3c5b716723fee8bae85e831f214c85ea033b5db8741710571 |
Close
Hashes for cdk_elasticache_monitor-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5232226206e81c5d235a6eeea9c14edf27c7831ef387dfb89469b77901d54a6 |
|
MD5 | 2df6146ccdc8e3fd43e454c539de2a75 |
|
BLAKE2b-256 | 77bfe8139b7f47243f0d2d9c6045dc4ed62f5e0846288c5922da0f9272b930ad |