-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f27f316
commit 0eb9440
Showing
13 changed files
with
172 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ __pycache__/ | |
*.so | ||
|
||
# CDK-Dia | ||
diagram.png* | ||
/diagram.* | ||
|
||
# Coverage.py | ||
.coverage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
from aws_cdk import aws_cloudwatch as cloudwatch | ||
from aws_cdk import core as cdk | ||
|
||
from api.infrastructure import API | ||
from api.infrastructure import Api | ||
from database.infrastructure import Database | ||
|
||
|
||
class Monitoring(cdk.Construct): | ||
def __init__(self, scope: cdk.Construct, id_: str, *, database: Database, api: API): | ||
def __init__(self, scope: cdk.Construct, id_: str, *, database: Database, api: Api): | ||
super().__init__(scope, id_) | ||
|
||
widgets = [ | ||
cloudwatch.SingleValueWidget(metrics=[api.http_api.metric_count()]), | ||
cloudwatch.SingleValueWidget( | ||
metrics=[api.api_gateway_http_api.metric_count()] | ||
), | ||
cloudwatch.SingleValueWidget( | ||
metrics=[database.dynamodb_table.metric_consumed_read_capacity_units()] | ||
), | ||
] | ||
cloudwatch.Dashboard(self, "Dashboard", widgets=[widgets]) | ||
cloudwatch.Dashboard(self, "CloudWatchDashboard", widgets=[widgets]) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.