Hi everyone
I am required to report WARN and CRITICAL messages to separate Slack channels, did a preliminary search for this but couldnt find much. In most cases in checks we specify slack handler and that sends all messages to one channel. Is there a way to send notifications to different slack channels depending on the severity of the alert?
One way to do this with stock handlers is to configure two handlers:
one handler for each channel. Then configure the different handlers
respond to different severities: https://sensuapp.org/docs/latest/handlers#definition-attributes (see
"severities")
So you might have a slack-criticals handler that operates on CRITICAL
and slack-warnings handler that operates on.. everything else? It
would be up to you.
It does require you to have each check send to both handlers. (or make
a handler set)
At Yelp we have lots of teams and lots of channels, so it was worth it
for us to handle this with a custom handler, sending "paging" alerts
to one channel and non-paging alerts to a different one, depending on
your team:
···
On Sat, Jun 27, 2015 at 12:16 AM, <aiman@flipagram.com> wrote:
Hi everyone
I am required to report WARN and CRITICAL messages to separate Slack
channels, did a preliminary search for this but couldnt find much. In most
cases in checks we specify slack handler and that sends all messages to one
channel. Is there a way to send notifications to different slack channels
depending on the severity of the alert?