-
Notifications
You must be signed in to change notification settings - Fork 16
/
dynamodb-capacity-monitor.yaml
54 lines (51 loc) · 1.3 KB
/
dynamodb-capacity-monitor.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
apiVersion: v1
summary: Monitor AWS DynamoDB provisioned capacity
description: This workflow sends a notification to Slack when DynamoDB provisioned capacity exceeds defined limits.
homepage: https://github.com/puppetlabs/relay-workflows/tree/master/dynamodb-capacity-monitor
tags:
- incident response
parameters:
slackChannel:
description: the Slack channel to send notifications to
default: "#ops"
triggers:
- name: schedule
source:
type: schedule
schedule: "0 */1 * * *"
steps:
- name: monitor
image: gcr.io/nebula-contrib/relay-aws-dynamodb-monitor
command: java
args:
- -jar
- /relay/aws-dynamodb-monitor.jar
spec:
aws: !Connection { type: aws, name: aws-connection }
ignore:
- us-gov-east-1
- us-gov-west-1
- us-iso-east-1
- us-isob-east-1
capacity:
- regions:
all: true
limits:
aggregate:
read: 500
write: 500
regional:
read: 100
write: 100
- name: slack-notify
image: relaysh/slack-step-message-send
when: !Fn.notEquals [!Output [monitor, capacity], ""]
spec:
connection: !Connection [slack, slack-connection]
channel: !Parameter slackChannel
username: Relay
message: !Fn.concat
- "⚠️ "
- "*Alert*"
- " ⚠️"
- !Output [monitor, capacity]