Skip to main content

Watching your CDK apps since 2019

Project description

cdk-watchful

CircleCI python typescript

Watching your CDK back since 2019

Watchful is an AWS CDK construct library that makes it easy to monitor CDK apps.

Watchful can manage a nice central dashboard and automatically configure default alarming for the following AWS resources:

Install

TypeScript/JavaScript:

$ npm install cdk-watchful

Python:

$ pip install cdk-watchful

Initialize

To get started, just define a Watchful construct in your CDK app (code is in TypeScript, but python will work too):

TypeScript/JavaScript:

import Watchful from 'cdk-watchful';

const wf = new Watchful(this, 'watchful', {
  alarmEmail: 'your@email.com'
});

Python:

from cdk_watchful import Watchful

wf = Watchful(self, 'watchful', alarm_email='your@amil.com')

Add Resources

TypeScript/JavaScript:

wf.watchDynamoTable('My Happy Little Table', littleTable);
wf.watchDynamoTable('My Very Happy Table', veryHappyTable);
wf.watchLambdaFunction('The Function', fn);

Python:

wf.watch_dynamo_table('My Happy Little Table', table)
wf.watch_lambda_function('Handler1', handler1)
wf.watch_lambda_function('Handler2', handler2)

Watching Scopes

Watchful can also watch complete CDK construct scopes. It will automatically discover all watchable resources within that scope (recursively), add them to your dashboard and configure alarms for them.

TypeScript/JavaScript:

wf.watchScope(storageLayer);

Python:

wf.watch_scope(storage_layer)

Example

See a more complete example, which will result in the following dashboard and alarms:

License

Apache 2.0

Project details


Release history Release notifications | RSS feed

This version

0.2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdk-watchful-0.2.0.tar.gz (125.6 kB view hashes)

Uploaded Source

Built Distribution

cdk_watchful-0.2.0-py3-none-any.whl (123.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page