{"id":13505592,"url":"https://github.com/cdklabs/cdk-watchful","last_synced_at":"2025-12-29T22:47:44.861Z","repository":{"id":37214151,"uuid":"194738138","full_name":"cdklabs/cdk-watchful","owner":"cdklabs","description":"Watching what's up with your CDK apps since 2019","archived":false,"fork":false,"pushed_at":"2024-05-23T00:21:32.000Z","size":6262,"stargazers_count":528,"open_issues_count":9,"forks_count":42,"subscribers_count":19,"default_branch":"main","last_synced_at":"2024-05-23T02:11:41.262Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdklabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-01T20:24:40.000Z","updated_at":"2024-05-28T03:36:21.519Z","dependencies_parsed_at":"2023-12-21T20:44:38.541Z","dependency_job_id":"714ae412-8908-4747-a1f1-eb0acfd0e833","html_url":"https://github.com/cdklabs/cdk-watchful","commit_stats":{"total_commits":1158,"total_committers":38,"mean_commits":"30.473684210526315","dds":0.4395509499136442,"last_synced_commit":"1ecaf12f6373d3059ede0ed0ebc3731ee03df5fe"},"previous_names":["eladb/cdk-watchful"],"tags_count":796,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdklabs%2Fcdk-watchful","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdklabs%2Fcdk-watchful/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdklabs%2Fcdk-watchful/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdklabs%2Fcdk-watchful/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdklabs","download_url":"https://codeload.github.com/cdklabs/cdk-watchful/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246262490,"owners_count":20749170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T00:01:10.324Z","updated_at":"2025-12-29T22:47:44.814Z","avatar_url":"https://github.com/cdklabs.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"-----\n\n### ✨ Have you heard of \u003ca href=\"https://github.com/cdklabs/cdk-monitoring-constructs\"\u003ecdk-monitoring-constructs\u003c/a\u003e? ✨\u003c/span\u003e\n\nWatchful on steroids. Check it out! 🔝\n\n-----\n\n# cdk-watchful\n\n\u003e Watching your CDK back since 2019\n\nWatchful is an [AWS CDK](https://github.com/awslabs/aws-cdk) construct library that makes it easy\nto monitor CDK apps. It automatically synthesizes alarms and dashboards for supported AWS resources.\n\n```ts\ndeclare const myTable: dynamodb.Table;\ndeclare const myFunction: lambda.Function;\ndeclare const myRestApi: apigw.RestApi;\n\nconst wf = new Watchful(this, 'watchful');\nwf.watchDynamoTable('My Cute Little Table', myTable);\nwf.watchLambdaFunction('My Function', myFunction);\nwf.watchApiGateway('My REST API', myRestApi);\n```\n\nAnd...\n\n![](https://raw.githubusercontent.com/eladb/cdk-watchful/master/example/sample.png)\n\n## Initialize\n\nTo get started, just define a `Watchful` construct in your CDK app. \nYou can initialize using an email address, SQS ARN or both:\n\n```ts\nimport * as sns from 'aws-cdk-lib/aws-sns';\nimport * as sqs from 'aws-cdk-lib/aws-sqs';\n\nconst alarmSqs = sqs.Queue.fromQueueArn(this, 'AlarmQueue', 'arn:aws:sqs:us-east-1:444455556666:alarm-queue')\nconst alarmSns = sns.Topic.fromTopicArn(this, 'AlarmTopic', 'arn:aws:sns:us-east-2:444455556666:MyTopic');\n\nconst wf = new Watchful(this, 'watchful', {\n  alarmEmail: 'your@email.com',\n  alarmSqs,\n  alarmSns,\n  alarmActionArns: [ 'arn:aws:sqs:us-east-1:444455556666:alarm-queue' ]\n});\n```\n\n## Add Resources\n\nWatchful manages a central dashboard and configures default alarming for:\n\n- Amazon DynamoDB: `watchful.watchDynamoTable`\n- AWS Lambda: `watchful.watchLambdaFunction`\n- Amazon API Gateway: `watchful.watchApiGateway`\n- [Request yours](https://github.com/eladb/cdk-watchful/issues/new)\n\n## Watching Scopes\n\nWatchful can also watch complete CDK construct scopes. It will automatically\ndiscover all watchable resources within that scope (recursively), add them\nto your dashboard and configure alarms for them.\n\n```ts\ndeclare const storageLayer: Stack;\ndeclare const wf: Watchful;\n\nwf.watchScope(storageLayer);\n```\n\n## Example\n\nSee a more complete [example](https://github.com/eladb/cdk-watchful/blob/master/example/index.ts).\n\n## Contributing\n\nContributions of all kinds are welcome and celebrated. Raise an issue, submit a PR, do the right thing.\n\nTo set up a dev environment:\n\n1. Clone this repo\n2. `yarn`\n\nDevelopment workflow (change code and run tests automatically):\n\n```shell\nyarn test:watch\n```\n\nBuild (like CI):\n\n```shell\nyarn build\n```\n\nAnd then publish as a PR.\n\n## License\n\n[Apache 2.0](https://github.com/eladb/cdk-watchful/blob/master/LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdklabs%2Fcdk-watchful","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdklabs%2Fcdk-watchful","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdklabs%2Fcdk-watchful/lists"}