metalmatze / alertmanager-bot

[deprecated] Bot for Prometheus' Alertmanager
MIT License
658 stars 147 forks source link

multi alertmanager-bot with single telegram token #16

Open vtolstov opened 6 years ago

vtolstov commented 6 years ago

I have problem:) i have 4 dc that contains 2 prometheus servers with 2 alertmanager with 2 alertmanager-bots 1 server contains: promethes+alertmanager+alertmanager-bot

but when i'm for example get /alerts command to bot, i'm receive only one answer from one dc. I don't want to create many bots, how can i work with multi dc mode ?

metalmatze commented 6 years ago

For now I'd probably create multiple bots for each data center. I'm not really sure how one can handle this case with Alertmanager itself. It's definitely an interesting use case, I might need to tackle at work too.

maxpain commented 4 years ago

I have the same problem

vtolstov commented 4 years ago

i'm contact telegram team and the best way to create application tokens and use it for bots ( https://my.telegram.org/apps )

maxpain commented 4 years ago

@vtolstov can you please describe your approach?

vtolstov commented 4 years ago

when you use application token each app with token from telegram POV is the different client, so you can distinguish it and control

timmy59100 commented 3 years ago

@vtolstov Could you please describe that some more? I don't get which token you generate how?

vtolstov commented 3 years ago

Try to check web page from telegram where you can get app keys

timmy59100 commented 3 years ago

@vtolstov Do you mean this? I can generate only one app. And api_hash is the token for alermanager-bot? image

vtolstov commented 3 years ago

Yes, try to connect with two apps with the same keys, it must looks like different clients