@rio-cloud/cdk-v2-constructs v4.33.4
RIO CDK Constructs
This package contains CDK2 constructs for RIO teams.
NPM:
@rio-cloud/cdk-v2-constructs
Bootstrapping of CDK project
$ npx cdk init --language typescript
Installation
$ npm install --save @rio-cloud/cdk-v2-constructs
See also
Internal documentation for library devs
Constructs overview (Under construction...)
Watchful
Watchful constructs help generate some default monitors based on the resouces defined in your stack. Eg - If your stack contains a lambda function and you configure watchful construct, then it will create out of box metric monitors for Throttling, Lambda error and Log error monitors. The ever growing list of resources that watchful creates monitors for as of today are:
- Application load balancer
- Cloudfront
- Documentdb
- Dynamodb
- Fargate
- Lambda
- RDS
Simply add the following to your CDK stack to get started.
import * as rio from '@rio-cloud/cdk-v2-constructs';
...
const dw = new rio.watchfulv2.Watchful(this, 'Watchful', {
serviceName,
});
dw.watchScope(this); // Generates alarms for all supported resources
...
There are options to override some defaults too. Please be aware that the library is very opinionated and is written with the most general use cases in mind. It is necessary to keep the use of the library simple enough, which means that there is only limited flexibility regarding the configuration options. Having said that, feel free to reach out to team CLAID over slack #rio-platform-support in case of feature requests.
The broad classification of the monitors created by watchful are
- Log error monitors
- Metrics Query monitors: Basically everything other than log error monitors
For Metrics query monitors, you can configure the priority (defaults as 3). For log error monitors, you can cpnfigure priority, renototification interval and can configure if the auto close of the monitor is disabled.
...
const dw = new Watchful(stack, 'Watchful2', {
logErrorMonitorConfig: {
disableAutoClose: true,
renotifyInterval: 150,
priority: 4,
},
queryErrorMonitorConfig: {
priority: 4
}
});
dw.watchScope(stack);
There is an overrideAlarmThreshold
method which can be used to override the default watchful thresholds. Please make aure to use the method before the watchscope
function.
Eg -
...
const dw = new Watchful(stack, 'Watchful', {});
dw.overrideAlarmThreshold({
monitoredResourceScope: lambdaA,
monitorType: MonitorType.ERRORS,
threshold: 5,
});
dw.watchScope(stack);
9 days ago
16 days ago
17 days ago
24 days ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
5 months ago
10 months ago
10 months ago
8 months ago
10 months ago
6 months ago
6 months ago
11 months ago
10 months ago
7 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
9 months ago
6 months ago
10 months ago
10 months ago
11 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago