Tune RDS messages
This commit is contained in:
parent
9229d32110
commit
3831ee7774
10
app.py
10
app.py
@ -264,8 +264,14 @@ def handler(event, context):
|
||||
elif "Event Source" in msg and msg['Event Source'] == "db-instance":
|
||||
try:
|
||||
title = msg["Event Message"]
|
||||
body = "for instance <{}|{}> - <{}|Event docs>".format(
|
||||
msg["Identifier Link"], msg["Source ID"], msg["Event ID"])
|
||||
try:
|
||||
name = " ({}).".format(
|
||||
msg["Tags"]["aws:cloudformation:stack-name"])
|
||||
except (KeyError, IndexError):
|
||||
name = ""
|
||||
|
||||
body = "RDS Instance: <{}|{}>{}\n<{}|Event docs>".format(
|
||||
msg["Identifier Link"], msg["Source ID"], name, msg["Event ID"])
|
||||
except KeyError:
|
||||
msg_type = apprise.NotifyType.WARNING
|
||||
body = sns["Message"]
|
||||
|
Loading…
Reference in New Issue
Block a user