07 Apr 2022 02:40 PM - last edited on 08 Apr 2022 09:22 AM by MaciejNeumann
Hi,
We want to integrate Dynatrace notifications with Telegram.
I think this can be done via Webhook.
I've seen this link https://hevodata.com/learn/telegram-webhooks/#s7 in which it seems it's possible to do that. But I have some questions about the implementation.
1.- On "Step1" on the link, it says that the first step in setting up Telegram Webhooks Integration is to obtain the Authorization Token.
So I guess we have to input that token clicking on "Creating basic authorization header". Am I right?
2.- I have doubts about what is the Webhook URL that we have to configure.
Reading the link, on step 4 it seems we have to put the Telegram Bot API URL. And a Telegram Bot API must be created to send notifications. So I guess we have to put Telegram Bot API URL on Webhook URL field in Dynatrace. Is that the case?
3.- And about the payload, I think it is clear this part for me: we should send the fields we want to be notified via Telegram. So, I have no doubts about this.
Has someone implemented that? Could someone help me?
Regards,
Elena.
Solved! Go to Solution.
11 Apr 2022 10:06 AM
Hello @erh_inetum ,
actually ,you need to get familiar with how the bots work in telegram. This was always quite challenging to setup, but you can find guides for it. I don't use telegram anymore, but this one below works for me.
URL is: https://api.telegram.org/bot<your_bot_token>/sendMessage
POST Method
JSON notification payload:
{ "chat_id": <your_chat_id>, "text": "<text_message>" }
Just replace:
Optionally you can send also markdown or HTML formatted messages, see telegram API docs.
05 Aug 2022 11:21 AM
I keep receiving an error, shown below... I am not sure what the issue is here... i have followed the above correctly and confirmed i have the correct token... and suggestions on how to resolve this?
Reason: Could not connect to the specified URL"
Regards,
Kishan
08 Aug 2022 08:52 PM - edited 08 Aug 2022 08:52 PM
@Kishan are you using Dyntrace Managed or SaaS? With Managed most likely your outbound connections from the cluster nodes to the URL are not allowed.
10 Aug 2022 07:51 AM
It is a managed solution thank you... I have confirmed the firewall wasnt opened when requested.