k8s-pod-restart-info-collector icon indicating copy to clipboard operation
k8s-pod-restart-info-collector copied to clipboard

send alert to multiple slack channels with 'modern' (not legacy) webhooks

Open hagaram opened this issue 1 year ago • 1 comments

Hi, at the moment, there is a possibility to override slack channel via label/annotation in your application.

Only legacy slack webhooks are capable of posting to multiple channels with one webhook URL via channel parameter.

Slack apps and "modern" incoming webhooks have specific URL mapped to specific channel, so there is no way to override them.

Would it be difficult to add some kind of option or better word would be mapping, where it would be possible to map annotation (or slack channel) alert-slack-channel: "your-slack-channel-name" to specific webhook URL in the config?

something like:

WebhookURLMapping:
  default: https://hooks.foo.bar/xxxxxxx
  my_second_channel: https://hooks.foo.bar/yyyyyyyy

I understand, that at the moment I can use legacy webhooks, but they will stop working eventually.

hagaram avatar Jan 09 '23 15:01 hagaram

@hagaram meanwhile I suggest you to have a look at Botkube. It offers maybe too much features for your use case, but you can fine tune a lot and offers a good level of flexibility. If I'm not wrong, we are using it with "modern" slack webhooks with a single URL but sending messages to multiple channels. Hope that was helpful.

bygui86 avatar Apr 04 '23 07:04 bygui86