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 50 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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc9acf686c1866cc9cc93638f55b55d4c7ca1d9fa2a8da50b2b039f4557ec572 |
|
MD5 | 7993edb491a28a09ed71cd169311e051 |
|
BLAKE2b-256 | 8ef4e80cbda4321226d08444ff869b85c7dd11bd7a44e7e2e413a0e8ffb91a98 |
Close
Hashes for cdk_elasticache_monitor-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2391f0c038e7d781c718e9597ebb6bcff37b6f2e6a156333772ef7cf46661d5c |
|
MD5 | f3757a0d51d73e329cf7d355793444c0 |
|
BLAKE2b-256 | 968f0c7562fd35d35a981b944ab631e52027af1bb55d4d8cc69925e4b144073e |