cdk-watchful


Namecdk-watchful JSON
Version 0.5.32 PyPI version JSON
download
home_pagehttps://github.com/eladb/cdk-watchful.git
SummaryWatching your CDK apps since 2019
upload_time2020-10-26 06:14:14
maintainer
docs_urlNone
authorElad Ben-Israel<elad.benisrael@gmail.com>
requires_python>=3.6
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cdk-watchful

![Release](https://github.com/eladb/cdk-watchful/workflows/Release/badge.svg)
[![python](https://img.shields.io/badge/jsii-python-blueviolet.svg)](https://pypi.org/project/cdk-watchful/)
[![typescript](https://img.shields.io/badge/jsii-typescript-blueviolet.svg)](https://www.npmjs.com/package/cdk-watchful)

> Watching your CDK back since 2019

Watchful is an [AWS CDK](https://github.com/awslabs/aws-cdk) construct library that makes it easy
to monitor CDK apps.

**TypeScript:**

```python
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from cdk_watchful import Watchful

wf = Watchful(self, "watchful")
wf.watch_dynamo_table("My Cute Little Table", my_table)
wf.watch_lambda_function("My Function", my_function)
wf.watch_api_gateway("My REST API", my_rest_api)
```

**Python:**

```python
from cdk_watchful import Watchful

wf = Watchful(self, 'watchful')
wf.watch_dynamo_table('My Cute Little Table', my_table)
wf.watch_lambda_function('My Function', my_function)
wf.watch_api_gateway('My REST API', my_rest_api)
```

And...

![](https://raw.githubusercontent.com/eladb/cdk-watchful/master/example/sample.png)

## Install

TypeScript/JavaScript:

```console
$ npm install cdk-watchful
```

Python:

```console
$ 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). You can initialize using an email address, SQS arn or both:

**TypeScript:**

```python
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from cdk_watchful import Watchful
import aws_cdk.aws_sns as sns
import aws_cdk.aws_sqs as sqs

alarm_sqs = sqs.Queue.from_queue_arn(self, "AlarmQueue", "arn:aws:sqs:us-east-1:444455556666:alarm-queue")
alarm_sns = sns.Topic.from_topic_arn(self, "AlarmTopic", "arn:aws:sns:us-east-2:444455556666:MyTopic")

wf = Watchful(self, "watchful",
    alarm_email="your@email.com",
    alarm_sqs=alarm_sqs,
    alarm_sns=alarm_sns
)
```

**Python:**

```python
from cdk_watchful import Watchful

alarm_sqs = sqs.Queue.from_queue_arn(self, 'AlarmQueue', 'arn:aws:sqs:us-east-1:444455556666:alarm-queue')
alarm_sns = sns.Topic.from_topic_arn(self, 'AlarmTopic', 'arn:aws:sns:us-east-2:444455556666:MyTopic')

wf = Watchful(
  self,
  'watchful',
  alarm_email='your@amil.com',
  alarm_sqs=alarm_sqs,
  alarm_sns=alarm_sns
```

## Add Resources

Watchful manages a central dashboard and configures default alarming for:

* Amazon DynamoDB: `watchful.watchDynamoTable`
* AWS Lambda: `watchful.watchLambdaFunction`
* Amazon API Gateway: `watchful.watchApiGateway`
* [Request yours](https://github.com/eladb/cdk-watchful/issues/new)

## 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:**

```python
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
wf.watch_scope(storage_layer)
```

**Python:**

```python
wf.watch_scope(storage_layer)
```

## API Reference

See [API.md](./API.md).

## Example

See a more complete [example](https://github.com/eladb/cdk-watchful/blob/master/example/index.ts).

## Contributing

Contributions of all kinds are welcome and celebrated. Raise an issue, submit a PR, do the right thing.

To set up a dev environment:

1. Clone repo
2. `yarn install`

Development workflow (change code and run tests automatically):

```shell
yarn test:watch
```

Build (like CI):

```shell
yarn build
```

Release new versions:

```shell
yarn bump
```

And then publish as a PR.

## License

[Apache 2.0](https://github.com/eladb/cdk-watchful/blob/master/LICENSE)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/eladb/cdk-watchful.git",
    "name": "cdk-watchful",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Elad Ben-Israel<elad.benisrael@gmail.com>",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/53/05/7ea68b608e040796eee5dd20d535f49603d545623d8fc1e698a75dd47b2b/cdk-watchful-0.5.32.tar.gz",
    "platform": "",
    "description": "# cdk-watchful\n\n![Release](https://github.com/eladb/cdk-watchful/workflows/Release/badge.svg)\n[![python](https://img.shields.io/badge/jsii-python-blueviolet.svg)](https://pypi.org/project/cdk-watchful/)\n[![typescript](https://img.shields.io/badge/jsii-typescript-blueviolet.svg)](https://www.npmjs.com/package/cdk-watchful)\n\n> 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.\n\n**TypeScript:**\n\n```python\n# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826\nfrom cdk_watchful import Watchful\n\nwf = Watchful(self, \"watchful\")\nwf.watch_dynamo_table(\"My Cute Little Table\", my_table)\nwf.watch_lambda_function(\"My Function\", my_function)\nwf.watch_api_gateway(\"My REST API\", my_rest_api)\n```\n\n**Python:**\n\n```python\nfrom cdk_watchful import Watchful\n\nwf = Watchful(self, 'watchful')\nwf.watch_dynamo_table('My Cute Little Table', my_table)\nwf.watch_lambda_function('My Function', my_function)\nwf.watch_api_gateway('My REST API', my_rest_api)\n```\n\nAnd...\n\n![](https://raw.githubusercontent.com/eladb/cdk-watchful/master/example/sample.png)\n\n## Install\n\nTypeScript/JavaScript:\n\n```console\n$ npm install cdk-watchful\n```\n\nPython:\n\n```console\n$ pip install cdk-watchful\n```\n\n## Initialize\n\nTo get started, just define a `Watchful` construct in your CDK app (code is in\nTypeScript, but python will work too). You can initialize using an email address, SQS arn or both:\n\n**TypeScript:**\n\n```python\n# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826\nfrom cdk_watchful import Watchful\nimport aws_cdk.aws_sns as sns\nimport aws_cdk.aws_sqs as sqs\n\nalarm_sqs = sqs.Queue.from_queue_arn(self, \"AlarmQueue\", \"arn:aws:sqs:us-east-1:444455556666:alarm-queue\")\nalarm_sns = sns.Topic.from_topic_arn(self, \"AlarmTopic\", \"arn:aws:sns:us-east-2:444455556666:MyTopic\")\n\nwf = Watchful(self, \"watchful\",\n    alarm_email=\"your@email.com\",\n    alarm_sqs=alarm_sqs,\n    alarm_sns=alarm_sns\n)\n```\n\n**Python:**\n\n```python\nfrom cdk_watchful import Watchful\n\nalarm_sqs = sqs.Queue.from_queue_arn(self, 'AlarmQueue', 'arn:aws:sqs:us-east-1:444455556666:alarm-queue')\nalarm_sns = sns.Topic.from_topic_arn(self, 'AlarmTopic', 'arn:aws:sns:us-east-2:444455556666:MyTopic')\n\nwf = Watchful(\n  self,\n  'watchful',\n  alarm_email='your@amil.com',\n  alarm_sqs=alarm_sqs,\n  alarm_sns=alarm_sns\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**TypeScript:**\n\n```python\n# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826\nwf.watch_scope(storage_layer)\n```\n\n**Python:**\n\n```python\nwf.watch_scope(storage_layer)\n```\n\n## API Reference\n\nSee [API.md](./API.md).\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 repo\n2. `yarn install`\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\nRelease new versions:\n\n```shell\nyarn bump\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\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Watching your CDK apps since 2019",
    "version": "0.5.32",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "31f319dc41e986e6d986a00a797c9965",
                "sha256": "83580561ed6d05f0a0e64407107b323e11d29b6d4c8a51ff1f70cb8a93beb950"
            },
            "downloads": -1,
            "filename": "cdk_watchful-0.5.32-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "31f319dc41e986e6d986a00a797c9965",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 151862,
            "upload_time": "2020-10-26T06:14:12",
            "upload_time_iso_8601": "2020-10-26T06:14:12.521682Z",
            "url": "https://files.pythonhosted.org/packages/2c/22/48ca7914b228a47be2da78cfbabb23727094f9ed3bfb3cf27d55478dd143/cdk_watchful-0.5.32-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "5a58ee002db21ed133f3901070a89d12",
                "sha256": "222b48a678f32bdb6b2649177064c614b80ced889bbdf3818e84559dd8fd7972"
            },
            "downloads": -1,
            "filename": "cdk-watchful-0.5.32.tar.gz",
            "has_sig": false,
            "md5_digest": "5a58ee002db21ed133f3901070a89d12",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 154069,
            "upload_time": "2020-10-26T06:14:14",
            "upload_time_iso_8601": "2020-10-26T06:14:14.034785Z",
            "url": "https://files.pythonhosted.org/packages/53/05/7ea68b608e040796eee5dd20d535f49603d545623d8fc1e698a75dd47b2b/cdk-watchful-0.5.32.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-10-26 06:14:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "eladb",
    "error": "Could not fetch GitHub repository",
    "lcname": "cdk-watchful"
}
        
Elapsed time: 0.16286s