Skip to main content

cdk-monitoring-constructs

Project description

CDK Monitoring Constructs

⚠️ This package isn't ready for use yet! ⚠️

Gitpod Ready-to-Code NPM version PyPI version NuGet version Maven Central Mergify

Easy-to-use CDK constructs for monitoring your AWS infrastructure.

  • Easily add commonly-used alarms using predefined properties
  • Generate concise Cloudwatch dashboards that indicate your alarms
  • Extend the library with your own extensions or custom metrics
  • Consume the library in multiple languages (see below)

Usage

TypeScript (NPM)

https://www.npmjs.com/package/cdk-monitoring-constructs

Add the dependency to your package.json:

{
  "dependencies": {
    "cdk-monitoring-constructs": "^0.0.11",

    // peer dependencies
    "constructs": "^3.3.69",
    "monocdk": "^1.123.0",

    // (your other dependencies)
  }
}

Java

https://mvnrepository.com/artifact/io.github.cdklabs/cdkmonitoringconstructs

Maven

Add the following Maven project to your pom.xml:

<dependency>
    <groupId>io.github.cdklabs</groupId>
    <artifactId>cdkmonitoringconstructs</artifactId>
    <version>0.0.11</version>
</dependency>

Gradle

implementation("io.github.cdklabs:cdkmonitoringconstructs:0.0.11")

Python (PyPi)

https://pypi.org/project/cdk-monitoring-constructs/

TODO: describe usage

C# (Nuget)

https://www.nuget.org/packages/Cdklabs.CdkMonitoringConstructs/

TODO: describe usage

Features

See API for complete auto-generated documentation.

You can also browse the documentation at https://constructs.dev/packages/cdk-monitoring-constructs/

Item Monitoring Alarms Notes
AWS API Gateway (REST API) (.monitorApiGateway()) TPS, latency, errors Latency, error count/rate To see metrics, you have to enable Advanced Monitoring
AWS API Gateway V2 (HTTP API) (.monitorApiGatewayV2HttpApi()) TPS, latency, errors Latency, error count/rate To see route level metrics, you have to enable Advanced Monitoring
AWS AppSync (GraphQL API) (.monitorAppSyncApi()) TPS, latency, errors Latency, error count/rate, low/high TPS
AWS Billing (.monitorBilling()) AWS account cost Requires enabling the Receive Billing Alerts option in AWS Console / Billing Preferences
AWS Certificate Manager (.monitorCertificate()) Certificate expiration Days until expiration
AWS CloudFront (.monitorCloudFrontDistribution()) TPS, traffic, latency, errors
AWS CodeBuild (.monitorCodeBuildProject()) Build counts (total, successful, failed), failed rate, duration Failed build count/rate, duration
AWS DynamoDB (.monitorDynamoTable()) Read and write capacity provisioned / used Consumed capacity, throttling, latency, errors
AWS DynamoDB Global Secondary Index (.monitorDynamoTableGlobalSecondaryIndex()) Read and write capacity, indexing progress, throttled events
AWS EC2 (.monitorEC2Instances()) CPU, disk operations, network
AWS EC2 Auto Scaling Groups (.monitorAutoScalingGroup()) Group size, instance status
AWS ECS (.monitorFargateService(), .monitorEc2Service(), .monitorSimpleFargateService(), monitorSimpleEc2Service(), .monitorQueueProcessingFargateService(), .monitorQueueProcessingEc2Service()) System resources and task health Unhealthy task count, running tasks count, CPU/memory usage, and bytes processed by load balancer (if any) Use for ecs-patterns load balanced ec2/fargate constructs (NetworkLoadBalancedEc2Service, NetworkLoadBalancedFargateService, ApplicationLoadBalancedEc2Service, ApplicationLoadBalancedFargateService)
AWS ElastiCache (.monitorElastiCacheCluster()) CPU/memory usage, evictions and connections
AWS Glue (.monitorGlueJob()) Traffic, job status, memory/CPU usage
AWS Kinesis Data Analytics (.monitorKinesisDataAnalytics) Up/Downtime, CPU/memory usage, KPU usage, checkpoint metrics, and garbage collection metrics Downtime
AWS Kinesis Data Stream (.monitorKinesisDataStream()) Put/Get/Incoming Record/s and Throttling Iterator max age
AWS Kinesis Firehose (.monitorKinesisFirehose()) Number of records, requests, latency
AWS Lambda (.monitorLambdaFunction()) Latency, errors, iterator max age Latency, errors, throttles, iterator max age Optional Lambda Insights metrics (opt-in) support
AWS Load Balancing (.monitorNetworkLoadBalancer(), .monitorFargateApplicationLoadBalancer(), .monitorFargateNetworkLoadBalancer(), .monitorEc2ApplicationLoadBalancer(), .monitorEc2NetworkLoadBalancer()) System resources and task health Unhealthy task count, running tasks count, (for Fargate/Ec2 apps) CPU/memory usage Use for FargateService or Ec2Service backed by a NetworkLoadBalancer or ApplicationLoadBalancer
AWS OpenSearch/Elasticsearch (.monitorOpenSearchCluster(), .monitorElasticsearchCluster()) Indexing and search latency, disk/memory/CPU usage Indexing and search latency, disk/memory/CPU usage, cluster status
AWS RDS (.monitorRdsCluster()) Query duration, connections, latency, disk/CPU usage Disk and CPU usage
AWS Redshift (.monitorRedshiftCluster()) Query duration, connections, latency, disk/CPU usage Disk and CPU usage
AWS S3 Bucket (.monitorS3Bucket()) Bucket size and number of objects
AWS SecretsManager (.monitorSecretsManagerSecret()) Days since last rotation Days since last rotation Requires the @aws-cdk/aws-secretsmanager:parseOwnedSecretName feature flag
AWS SNS Topic (.monitorSnsTopic()) Message count, size, failed notifications Failed notifications
AWS SQS Queue (.monitorSqsQueue(), .monitorSqsQueueWithDlq()) Message count, age, size Message count, age, DLQ incoming messages
AWS Step Functions (.monitorStepFunction(), .monitorStepFunctionActivity(), monitorStepFunctionLambdaIntegration(), .monitorStepFunctionServiceIntegration()) Execution count and breakdown per state Duration, failed, failed rate, aborted, throttled, timed out executions
CloudWatch Logs (.monitorLog()) Patterns present in the log group
Custom metrics (.monitorCustom()) Addition of custom metrics into the dashboard (each group is a widget) Supports anomaly detection

Contributing/Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

cdk-monitoring-constructs-0.0.16.tar.gz (777.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cdk_monitoring_constructs-0.0.16-py3-none-any.whl (779.9 kB view details)

Uploaded Python 3

File details

Details for the file cdk-monitoring-constructs-0.0.16.tar.gz.

File metadata

  • Download URL: cdk-monitoring-constructs-0.0.16.tar.gz
  • Upload date:
  • Size: 777.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for cdk-monitoring-constructs-0.0.16.tar.gz
Algorithm Hash digest
SHA256 4784d3ff3d2e872d074de5700bd44d8949ae77df15c9b7109ffe375f9dbfca49
MD5 9019e7ee342f00bb1f26042ee524117c
BLAKE2b-256 03ecb1391ffca65ccbfc0f686825296b7582cb8a93b26582663ff4bc3e63b772

See more details on using hashes here.

File details

Details for the file cdk_monitoring_constructs-0.0.16-py3-none-any.whl.

File metadata

  • Download URL: cdk_monitoring_constructs-0.0.16-py3-none-any.whl
  • Upload date:
  • Size: 779.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for cdk_monitoring_constructs-0.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 fac21dde532f8e2712c2d5167584c5fd04c6418b35852b81255b5854762a54b4
MD5 05986735099bbeaa3b019e127feb487d
BLAKE2b-256 e1136e4a14757d9ef27b028fc60bdc8e3dee6dbe81a1d06986330568a11b7c4b

See more details on using hashes here.

Supported by

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