New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@navigraph/cdk-alarms

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@navigraph/cdk-alarms

CDK Alarms

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

CDK Alarms

Set up Cloud watch alarms and send notifications on the specified topic.

Setup

$ npm i @navigraph/cdk-alarms
import { NavigraphAlarm, NavigraphElbAlarm, NavigraphRdsAlarm } from '@navigraph/cdk-alarms';
// ...
const topic = new Topic(this, 'ErrorNotificationTopic');

NavigraphAlarm

Base alarm used for standard metrics or complex ones including mathExpression.

Example

new NavigraphAlarm(this, 'ErrorLogAlarm', {
      alarmName: 'error-log-rate',
      topic,
      metricName: 'ERROR_LOG_METRIC',
      namespace: 'production-application-X',
    });

NavigraphElbAlarm

Helper for ELB alarms.

Example

new NavigraphElbAlarm(this, 'Http500ElbAlarm', {
  alarmName: 'elb-http-500',
  topic,
  metricName: 'HTTPCode_Backend_5XX',
  loadbalancerName: 'theLoadBalancerName',
  threshold: 1,
  statistic: 'max', 
  treatMissingData: TreatMissingData.NOT_BREACHING,
  reportOk: false,
});

NavigraphAlbAlarm

Helper for ALB alarms.

Example

new NavigraphAlbAlarm(this, 'Http500AlbAlarm', {
  alarmName: 'elb-http-500',
  topic,
  metricName: 'HTTPCode_Target_5XX_Count',
  loadbalancerName: 'theLoadBalancerName',
  targetgroupName: 'theTargetGroupName',
  threshold: 10,
  evaluationPeriod: 5,
  statistic: 'sum',
  treatMissingData: TreatMissingData.NOT_BREACHING,
});

NavigraphRdsAlarm

Helper for RDS alarms.

Example

new NavigraphRdsAlarm(this, 'CommitLatencyAlarm', {
  alarmName: 'postgres-commit-latency',
  topic,
  dbClusterName: 'theDbClusterName',
  metricName: 'CommitLatency',
  threshold: 1, // ms
});

NavigraphEcsServiceAlarm

Helper for ECS service alarms.

new NavigraphEcsServiceAlarm(this, 'CPUUtilizationAlarm', {
  alarmName: 'cpu-utilization-alarm',
  topic,
  serviceName: 'theFargateEcsService',
  metricName: 'CPUUtilization',
  threshold: 60
});

FAQs

Package last updated on 04 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc