Skip to content

Adding telegram support #2827

Merged
simonpasquier merged 20 commits intoprometheus:mainfrom
timmilesdw:telegram-integration
Feb 22, 2022
Merged

Adding telegram support #2827
simonpasquier merged 20 commits intoprometheus:mainfrom
timmilesdw:telegram-integration

Conversation

@timmilesdw
Copy link
Contributor

@timmilesdw timmilesdw commented Feb 4, 2022

Added telegram integration

Features:

  • Custom API URL
  • Disable Notifications
  • Message templating

image

Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
@timmilesdw timmilesdw force-pushed the telegram-integration branch from 0d0d107 to b52fdac Compare February 4, 2022 06:06
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
@timmilesdw timmilesdw changed the title Telegram support Adding telegram support Feb 4, 2022
@timmilesdw
Copy link
Contributor Author

@w0rm

@SuperQ SuperQ requested review from simonpasquier and w0rm February 4, 2022 17:34
@w0rm
Copy link
Member

w0rm commented Feb 4, 2022

@timmilesdw @SuperQ sorry folks, I can’t review the go code! Happy to review the UI anytime though 😅

@timmilesdw
Copy link
Contributor Author

Oh, sorry, i had no clue about it. @SuperQ can you please revoke review request from w0rm? I should probably mention @simonpasquier instead

@SuperQ SuperQ requested review from gouthamve and matthiasr and removed request for w0rm February 6, 2022 11:11
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
…hanged message truncation to 4096 chars

Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
@timmilesdw timmilesdw requested a review from matthiasr February 7, 2022 09:29
@timmilesdw
Copy link
Contributor Author

the test is failing, but i don't see that i affect the TestClusterDeduplication test, maybe someone could rerun tests?

@metalmatze
Copy link
Member

This looks amazing and I'd love to see this being added to alertmanager itself!
Since the alertmanager-bot only ever supported Telegram and only few of the chat commands really are used, I'd be happy to sunset/deprecate the bot in-favor if this implementation.

Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
Signed-off-by: timmilesdw <tuktamyshev.t0308@gmail.com>
@timmilesdw
Copy link
Contributor Author

Could someone rerun frontend test? Failed because it can't pull image from dockerhub

@metalmatze
Copy link
Member

Anything left to do here in order to merge? Amazing work!

@timmilesdw
Copy link
Contributor Author

Anything left to do here in order to merge? Amazing work!

Thanks! @simonpasquier any updates?

@timmilesdw
Copy link
Contributor Author

Comment for activity, waiting for merge or re-review

@simonpasquier
Copy link
Member

Chatted offline with @metalmatze who's willing to help with maintaining this integration so this is a 👍 for me too.

@simonpasquier simonpasquier merged commit 1138a08 into prometheus:main Feb 22, 2022
@simonpasquier
Copy link
Member

Thanks!

@timmilesdw
Copy link
Contributor Author

Great! Thank you too!

@chanyshev
Copy link

chanyshev commented May 7, 2022

I have chat_id negative number and I see this error
"Notify attempt failed, will retry later" attempts=1 err="telegram: Bad Request: can't parse entities: Character '-' is reserved and must be escaped with the preceding '\\' (400)"
udp:
The problem turned out to be in the parameter parse_mode:
I changed to HTML and the messages started coming.
How to use parse_mode: MarkdownV2 ?

@tazhate
Copy link

tazhate commented May 19, 2022

HOLY MOLY! Thanks a lot for this MR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants