@openaddresses/batch-alarms
v4.4.0
Published
Library for providing default CloudFormation dashboards & ECS Services
Downloads
471
Readme
Installation
npm add batch-alarms
Usage
Notifying an Email
import cf from '@openaddresses/cloudfriend';
import {
ELB as ELBAlarms,
RDS as RSDAlarms
} from 'batch-alarms';
cf.merge(
template,
ELBAlarms({
prefix: 'CFPrefix',
apache: cf.stackName,
email: '[email protected]',
cluster: cf.ref('APIECSCluster'),
service: cf.getAtt('APIService', 'Name'),
loadbalancer: cf.getAtt('APIELB', 'LoadBalancerFullName'),
targetgroup: cf.getAtt('APITargetGroup', 'TargetGroupFullName'),
}),
ELBAlarms({
prefix: 'CFPrefix',
email: '[email protected]',
targetgroup: cf.ref('RDSInstance')
})
);
Notifying an Existing SNS Topic
import cf from '@openaddresses/cloudfriend';
import {
ELB as ELBAlarms,
RDS as RSDAlarms
} from 'batch-alarms';
cf.merge(
template,
ELBAlarms({
prefix: 'CFPrefix',
apache: cf.stackName,
topic: cf.ref('ExistingTopic'),
cluster: cf.ref('APIECSCluster'),
service: cf.getAtt('APIService', 'Name'),
loadbalancer: cf.getAtt('APIELB', 'LoadBalancerFullName'),
targetgroup: cf.getAtt('APITargetGroup', 'TargetGroupFullName'),
}),
ELBAlarms({
prefix: 'CFPrefix',
topic: cf.ref('ExistingTopic'),
targetgroup: cf.ref('RDSInstance')
})
);