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)

Repository: 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 (Maven)

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

Add the following Maven project to your pom.xml:

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

Python (PyPi)

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

TODO: describe usage

C# (Nuget)

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

TODO: describe usage

Documentation

See API for complete auto-generated documentation.

Contributing/Security

See CONTRIBUTING for more information.

Features

  • AWS API Gateway (REST API) (.monitorApiGateway())

    • To see metrics, you have to enable Advanced Monitoring
    • monitoring of TPS, latency, errors
    • alarm on latency, error count/rate
  • AWS API Gateway V2 (HTTP API) (.monitorApiGatewayV2HttpApi())

    • To see route level metrics, you have to enable Advanced Monitoring
    • monitoring of TPS, latency, errors
    • alarm on latency, error count/rate
  • AWS AppSync (GraphQL API) (.monitorAppSyncApi())

    • monitoring of TPS, latency, errors
    • alarm on latency, error count/rate, low/high TPS
  • AWS Certificate Manager (.monitorCertificate())

    • monitoring of certificate expiration
    • alarm on days until expiration
  • AWS CloudFront (.monitorCloudFrontDistribution())

    • monitoring of TPS, traffic, latency, errors
    • no alarms supported yet
  • AWS CodeBuild (.monitorCodeBuildProject())

    • monitoring of build counts (total, successful, failed), failed rate, duration
    • alarm on failed build count/rate, duration
  • AWS DynamoDB (.monitorDynamoTable())

    • monitoring of read and write capacity provisioned / used
    • alarm on consumed capacity, throttling, latency, errors
  • AWS DynamoDB Global Secondary Index (.monitorDynamoTableGlobalSecondaryIndex())

    • monitoring of read and write capacity, indexing progress, throttled events
    • no alarm support yet
  • AWS EC2 (.monitorEC2Instances())

    • monitoring of CPU, disk operations, network
    • no alarms supported yet
  • AWS EC2 Auto Scaling Groups (.monitorAutoScalingGroup())

    • monitoring of group size, instance status
    • no alarms supported yet
  • AWS ECS (.monitorFargateService(), .monitorEc2Service(), .monitorSimpleFargateService(), monitorSimpleEc2Service(), .monitorQueueProcessingFargateService(), .monitorQueueProcessingEc2Service())

    • monitoring of system resources and task health
    • alarm on 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())

    • monitoring of CPU/memory usage, evictions and connections
    • no alarms supported yet
  • AWS Glue (.monitorGlueJob())

    • monitoring of traffic, job status, memory/CPU usage
    • no alarms supported yet
  • AWS Kinesis Data Analytics (.monitorKinesisDataAnalytics)

    • monitoring of Up/Downtime, CPU/memory usage, KPU usage, checkpoint metrics, and garbage collection metrics
    • alarm on downtime
  • AWS Kinesis Data Stream (.monitorKinesisDataStream())

    • monitoring of Put/Get/Incoming Record/s and Throttling
    • alarm on iterator max age
  • AWS Kinesis Firehose (.monitorKinesisFirehose())

    • monitoring of number of records, requests, latency
    • no alarms supported yet
  • AWS Lambda (.monitorLambdaFunction())

    • monitoring of latency, errors, iterator max age
    • alarm on latency, errors, throttles, iterator max age
    • monitoring of Lambda Insights metrics (opt-in)
  • AWS Load Balancing (.monitorNetworkLoadBalancer(), .monitorFargateApplicationLoadBalancer(), .monitorFargateNetworkLoadBalancer(), .monitorEc2ApplicationLoadBalancer(), .monitorEc2NetworkLoadBalancer())

    • monitoring of system resources and task health
    • alarm on 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())

    • monitoring of indexing and search latency, disk/memory/CPU usage
    • alarm on indexing and search latency, disk/memory/CPU usage, cluster status
  • AWS RDS (.monitorRdsCluster())

    • monitoring of query duration, connections, latency, disk/CPU usage
    • alarm on disk and CPU usage
  • AWS Redshift (.monitorRedshiftCluster())

    • monitoring of query duration, connections, latency, disk/CPU usage
    • alarm on disk and CPU usage
  • AWS S3 Bucket (.monitorS3Bucket())

    • monitoring of bucket size and number of objects
    • no alarms supported yet
  • AWS SecretsManager (.monitorSecretsManagerSecret())

    • monitoring of days since last rotation
    • alarm on days since last rotation
    • requires the @aws-cdk/aws-secretsmanager:parseOwnedSecretName feature flag
  • AWS SNS Topic (.monitorSnsTopic())

    • monitoring of message count, size, failed notifications
    • alarm on failed notifications
  • AWS SQS Queue (.monitorSqsQueue(), .monitorSqsQueueWithDlq())

    • monitoring of message count, age, size
    • alarm on message count, age
    • the same alarms for dead letter queue (DLQ)
    • DLQ alarm on incoming messages
  • AWS Step Functions (.monitorStepFunction(), .monitorStepFunctionActivity(), .monitorStepFunctionLambdaIntegration(), .monitorStepFunctionServiceIntegration())

    • monitoring of execution count and breakdown per state
    • alarms on duration, failed, failed rate, aborted, throttled, timed out executions
  • AWS Billing (.monitorBilling())

    • monitoring AWS account cost (you need to enable the Receive Billing Alerts option in AWS Console / Billing Preferences)
    • no alarms support yet
  • CloudWatch Logs (.monitorLog())

    • monitoring of patterns present in the log group
  • Custom metrics (.monitorCustom())

    • simple addition of custom metrics into the dashboard (each group is a widget)
    • supports anomaly detection

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.14.tar.gz (777.9 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.14-py3-none-any.whl (779.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cdk-monitoring-constructs-0.0.14.tar.gz
  • Upload date:
  • Size: 777.9 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.14.tar.gz
Algorithm Hash digest
SHA256 d68250c5bb21dabc402dae6bacf1f556c4e1ad8e0044fba318d9a7834ebfc787
MD5 1741978190a88c2085474c9421a5f340
BLAKE2b-256 1bf4c15ad7c478d50cee81fec134c9e178bc2da4edfeef499ce6dbc3c06e9935

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cdk_monitoring_constructs-0.0.14-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.14-py3-none-any.whl
Algorithm Hash digest
SHA256 d809514632ca77b94f82df7e63089e3f89a903f6f502965659ff48cc8f47b028
MD5 6c3e7eacbc79381c3ec04fe9181e69bb
BLAKE2b-256 eb027e03f539465419086af473f1dba109110daf6e87bc572136f6bff1f5dd23

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