Skip to content
This repository was archived by the owner on Oct 21, 2020. It is now read-only.

Commit 1d95aef

Browse files
committed
feat: cloudwatch monitoring
1 parent f5b85af commit 1d95aef

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"nodemon": "^1.17.3",
8585
"prettier": "^1.11.1",
8686
"prettier-package-json": "^1.5.1",
87+
"serverless-plugin-aws-alerts": "^1.2.4",
8788
"sinon": "^4.5.0",
8889
"sinon-stub-promise": "^4.0.0",
8990
"source-map-support": "^0.5.4"

serverless.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,36 @@ plugins:
2121
- serverless-webpack
2222
- serverless-offline-scheduler
2323
- serverless-offline
24+
- serverless-plugin-aws-alerts
2425

2526
custom:
2627
serverless-offline:
2728
port: 4000
2829
webpack:
2930
webpackConfig: ./webpack.config.js
3031
includeModules: true
32+
notifications:
33+
- protocol email
34+
35+
- protocol https # Announce on Gitter
36+
endpoint https://webhooks.gitter.im/e/957145b550e13c6d3a80
37+
alerts:
38+
stages: # Optionally - select which stages to deploy alarms to
39+
- production
40+
- staging
41+
dashboards: true
42+
topics:
43+
ok: ${self:service}-${opt:stage}-alerts-ok
44+
notifications: ${self:custom.notifications}
45+
alarm: ${self:service}-${opt:stage}-alerts-alarm
46+
notifications: ${self:custom.notifications}
47+
insufficientData: ${self:service}-${opt:stage}-alerts-insufficientData
48+
notifications: ${self:custom.notifications}
49+
alarms:
50+
- functionThrottles
51+
- functionErrors
52+
- functionInvocations
53+
- functionDuration
3154

3255
functions:
3356
graphql:

yarn.lock

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4796,7 +4796,7 @@ [email protected]:
47964796
version "4.17.2"
47974797
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42"
47984798

4799-
lodash@^4.0.0, lodash@^4.11.1, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.8.0:
4799+
lodash@^4.0.0, lodash@^4.11.1, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.16.6, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.8.0:
48004800
version "4.17.10"
48014801
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
48024802

@@ -6568,6 +6568,12 @@ serverless-offline@^3.20.0:
65686568
uuid "^3.2.1"
65696569
velocityjs "^0.9.3"
65706570

6571+
serverless-plugin-aws-alerts@^1.2.4:
6572+
version "1.2.4"
6573+
resolved "https://registry.yarnpkg.com/serverless-plugin-aws-alerts/-/serverless-plugin-aws-alerts-1.2.4.tgz#df0958acf128298aa069dd38e134b0104c3d2f44"
6574+
dependencies:
6575+
lodash "^4.16.6"
6576+
65716577
serverless-webpack@^5.1.1:
65726578
version "5.1.1"
65736579
resolved "https://registry.yarnpkg.com/serverless-webpack/-/serverless-webpack-5.1.1.tgz#2ff8d1d48c4103104bc1ea8aaa7aee9a4e337af4"

0 commit comments

Comments
 (0)