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

Commit 1b63218

Browse files
committed
feat: cloudwatch monitoring
1 parent 1058dd2 commit 1b63218

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
"prettier": "^1.11.1",
9090
"prettier-package-json": "^1.5.1",
9191
"serverless-plugin-notification-ojongerius": "^1.3.1",
92+
"serverless-plugin-aws-alerts": "^1.2.4",
9293
"sinon": "^4.5.0",
9394
"sinon-stub-promise": "^4.0.0",
9495
"source-map-support": "^0.5.4"

serverless.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ plugins:
2525
- serverless-offline-scheduler
2626
- serverless-offline
2727
- serverless-plugin-notification-ojongerius
28+
- serverless-plugin-aws-alerts
2829

2930
custom:
3031
serverless-offline:
@@ -35,6 +36,28 @@ custom:
3536
notification:
3637
webhook:
3738
url: ${env:GITTER_WEBHOOK}
39+
notifications:
40+
- protocol email
41+
42+
- protocol https # Announce on Gitter
43+
endpoint https://webhooks.gitter.im/e/957145b550e13c6d3a80
44+
alerts:
45+
stages: # Optionally - select which stages to deploy alarms to
46+
- production
47+
- staging
48+
dashboards: true
49+
topics:
50+
ok: ${self:service}-${opt:stage}-alerts-ok
51+
notifications: ${self:custom.notifications}
52+
alarm: ${self:service}-${opt:stage}-alerts-alarm
53+
notifications: ${self:custom.notifications}
54+
insufficientData: ${self:service}-${opt:stage}-alerts-insufficientData
55+
notifications: ${self:custom.notifications}
56+
alarms:
57+
- functionThrottles
58+
- functionErrors
59+
- functionInvocations
60+
- functionDuration
3861

3962
functions:
4063
graphql:

yarn.lock

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

4866-
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:
4866+
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:
48674867
version "4.17.10"
48684868
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
48694869

@@ -6645,6 +6645,11 @@ serverless-plugin-notification-ojongerius@^1.3.1:
66456645
dependencies:
66466646
bluebird "^3.5.0"
66476647
request-promise-lite "0.9"
6648+
serverless-plugin-aws-alerts@^1.2.4:
6649+
version "1.2.4"
6650+
resolved "https://registry.yarnpkg.com/serverless-plugin-aws-alerts/-/serverless-plugin-aws-alerts-1.2.4.tgz#df0958acf128298aa069dd38e134b0104c3d2f44"
6651+
dependencies:
6652+
lodash "^4.16.6"
66486653

66496654
serverless-webpack@^5.1.1:
66506655
version "5.1.1"

0 commit comments

Comments
 (0)