alerta / alerta-contrib

Contributed integrations, plugins and custom webhooks
http://alerta.io
MIT License
119 stars 170 forks source link

add SLACK_CHANNEL_MAP for environment and severity mapping #314

Closed waybeforenow closed 4 years ago

waybeforenow commented 4 years ago

Because I wanted to make the general-purpose #alerts channel on Slack only receive important production alerts, I needed a way to be able to choose which channel an alert goes to based on environment and severity.

In the process, I cleaned up the payload code a little bit and made ICON_EMOJI optional. Now you can upload a custom avatar for your webhook and it'll display as long as ICON_EMOJI isn't set.

satterly commented 4 years ago

The tests might pass if you bump pytest to the latest version in requirements-dev.txt. See https://github.com/alerta/alerta/blob/master/requirements-dev.txt#L5

waybeforenow commented 4 years ago

Looks like you were correct.

satterly commented 4 years ago

👍