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

Specifying different notifiers for different nodes

Open mar-io opened this issue 9 years ago • 3 comments

Thought it would be useful to have the ability to disable/enable certain notifications for particular nodes and not others.

For example, lets say you have a production and dev environment. I might still want emails from nodes in dev environments but not pagerduty alerts. However I do want both email notifier and pager duty notifier for prod alerts. Being able to wildcard the nodes by name to use for a certain notifier would be a plus.

mar-io avatar Oct 22 '15 06:10 mar-io

Could be a useful feature, though requires a big change with the current state of the code.

darkcrux avatar Jan 04 '16 08:01 darkcrux

I've implemented code that does this. I have not added a wildcard by node name, instead opting to group nodes by service or check name. This keeps the code smaller and more efficient while still providing a mechanism to group hosts into prod or dev profiles. This patch also breaks up custom notifiers so that they can be individually named and added to profiles.

https://github.com/AcalephStorage/consul-alerts/pull/89

fusiondog avatar Jan 08 '16 22:01 fusiondog

Here is an example of a profile definition (the false is in for demonstration, you do not need to specify disabled notifiers, you can leave them in for documentation): { "Interval": 10, "NotifList": { "log":false, "email":true } }

fusiondog avatar Jan 08 '16 23:01 fusiondog