consul-alerts icon indicating copy to clipboard operation
consul-alerts copied to clipboard

Multiple notification paths

Open nickwales opened this issue 8 years ago • 3 comments

Is it possible to route alerts to different pagerduty services / slack channels etc dependent on some consul data.

For example services tagged with 'database' could go to the dba team.

nickwales avatar Apr 08 '16 13:04 nickwales

With the current state of the code there isn't a way to have multiple alternate settings for the built in notifiers. To achieve this with the current code would require you to set up new custom notifiers that independently interacted with pagerduty or slack with the alternate config. Then in the profile config you would create a profile that used the custom notifier and set the database services or checks to use that profile.

I have considered that it may be useful to enable the profiles to also hold override variables for the default notifiers. Then it would be possible to achieve what you suggest without a special cutom notifier script.

fusiondog avatar Apr 08 '16 15:04 fusiondog

It would be perfect override the default variables for each profile. My suggestion for this feature is choose whether to send notification to the default as well.

The slack is a good example, I could have a channel that receives all notifications of any service and other specific channels of each team.

In this way both the infrastructure team and the database team would be notified.

thiago avatar Jul 28 '16 17:07 thiago

What does it entail to write a custom notifier? Where can i find the details?

imrangit avatar Nov 03 '16 23:11 imrangit