You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I prefer not to have to statically configure recipients for alerts but rather have the alert writer decide how and where to route his alerts to. To this end I configured generic routes in Alertmanager where its recipient(s) is a label attached to said alert. It would be nice if Sachet would also be able to parse these labels into a list of recipients. I dabbled a bit in Go so I've implemented it. These scratching are far from proper code, but it works. I'm not making it a PR because it may be a buggy mess and it's certainly quite ugly. But it works for me.
How to use this? Configure your sachet receiver as usual, but instead of an actual recipient (number, account or whatever) put in (only!) the label which the receiver should analyze for receivers. E.g.:
providers:
cm:
producttoken: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
telegram:
token: 'xxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
receivers:
- name: 'sms_to'
provider: 'cm'
to:
- 'sms_to'
from: '...'
text: 'This is your extrahandy SMS provider, receiving an alert from Alertmanager!'
- name: 'telegram_to'
provider: 'telegram'
to:
- 'telegram_to'
text: 'This is your extrahandy Telegram chat bot, receiving an alert from Alertmanager!'
Boot up Sachet (after building, obviously) and send it a JSON like so (note the added GroupLabels with a comma separated string with recipients) will send in this case an SMS, but a Telegram works the same way. That's the only two providers I've tested because that's what I have access to and I don't need any more than this to be honest. Though MS Teams support would be nice.
It would be great if something like this could be added to this project so I don't need to maintain my own fork and builds anymore. Also, input on how to better implement this is also appreciated.
The text was updated successfully, but these errors were encountered:
I prefer not to have to statically configure recipients for alerts but rather have the alert writer decide how and where to route his alerts to. To this end I configured generic routes in Alertmanager where its recipient(s) is a label attached to said alert. It would be nice if Sachet would also be able to parse these labels into a list of recipients. I dabbled a bit in Go so I've implemented it. These scratching are far from proper code, but it works. I'm not making it a PR because it may be a buggy mess and it's certainly quite ugly. But it works for me.
How to use this? Configure your sachet receiver as usual, but instead of an actual recipient (number, account or whatever) put in (only!) the label which the receiver should analyze for receivers. E.g.:
Boot up Sachet (after building, obviously) and send it a JSON like so (note the added GroupLabels with a comma separated string with recipients) will send in this case an SMS, but a Telegram works the same way. That's the only two providers I've tested because that's what I have access to and I don't need any more than this to be honest. Though MS Teams support would be nice.
It would be great if something like this could be added to this project so I don't need to maintain my own fork and builds anymore. Also, input on how to better implement this is also appreciated.
The text was updated successfully, but these errors were encountered: