Skip to content

Commit

Permalink
Fix no preview available in slack notifications (#1)
Browse files Browse the repository at this point in the history
Add fallback with state and alarm name to attachment
  • Loading branch information
zoltanmeze authored Oct 14, 2020
1 parent bb0e519 commit d13a4d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.idea/
out/
*.iml
venv/
1 change: 1 addition & 0 deletions cloudwatch_to_slack/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def construct_slack_message(name, description, trigger, dimensions,
message = {
'attachments': [
{
'fallback': new_state + ": " + name,
'color': COLORS.get(new_state, UNKNOWN_COLOR),
'blocks': message_attachments
}
Expand Down
3 changes: 2 additions & 1 deletion cloudwatch_to_slack/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pytest~=6.0.2
pytest~=6.1.1
iniconfig==1.0.1

0 comments on commit d13a4d5

Please sign in to comment.