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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a5715bbcffc80000960cc04f189c58662f3443cee9943c91b5cc85772a11f57 |
|
MD5 | bfdbfc5dfeef758905dd3ca3eb82f018 |
|
BLAKE2b-256 | edc2edaf4cfd226bed90385c917589076a88e45e29def2b312c1aa6e3bdc9ae9 |
Close
Hashes for cdk_elasticache_monitor-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b09be5b012da7caf3c1f60763da2bead6f3bcf114761788516dabd6597eeff4 |
|
MD5 | 39073b3e93074b54441007ff09c233c6 |
|
BLAKE2b-256 | c859d53d19cc50e805c60943a0e537a8cb826529c6278e21772cc3e789fce03c |