Alerts for your validator via telegram public

Before I told you how to integrate Grafana Alerts in e-mail or pager duty notifications, let’s make now a Telegram integrations with a bot to receive alerts directly to your public channel/chat.

  1. Create a new Contact point

1

11529×836 63.2 KB

Here we need the following information
1.1 Enter a name
1.2 Choose telegram from list
1.3 Insert BOT API Token
1.4 Insert Chat ID of your group/channel or your profile
1.5 Save

To get the BOT API Token we need to create our own bot, you can do it with the @BotFather bot

2

3829×530 22.2 KB

Run, enter the command /newbot
Then enter the name of the bot. username of the bot, which will be displayed in the link. That’s it, the bot is created, we got its API Token.

There are two ways to get a Chat ID (where Grafana will send the notification):

  1. Group/Channel
  2. Our bot

1 option.
Add the bot to our group/channel and give it admin rights so it can write messages.

The group/channel must be public. After getting Chat ID you can make it private.

Use the online Chat ID identifier. - you can translate site in English

4

Option 2.
Run our bot, which we created in BotFather, so that we have an open chat with it, where it will send us messages.
Next, find out our profile ID using the @RawDataBot
This website
And put our ID in the Chat ID field in Grafana and send a test message. Save it.
Then go to Notification Policies and edit the Default rule, putting Telegram in the Contact Point line.
That’s it, the configuration is done, now you will get the messages to Telegram when creating the Alerts.

Thanks for your time!

29 Likes

Thanks again for this wonderful information and valuable guide. We hope you continue to stay with us in this great forum and keep providing such valuable insights in the future.

8 Likes

Always a pleasure reading your thread👌

6 Likes

Nicely put

5 Likes

Insightful. Thanks

4 Likes

holy alpha bro. good job man :scream_cat:

4 Likes

Haha, this is actually legitimately useful. good name too - Raw Data. i like it!

2 Likes

What an innovation

1 Like

great article buddy!

5 Likes

Thank you sir for informations

2 Likes

@hamta what do you thing for tis post

2 Likes

i thing this post is true

2 Likes

nice thread man

1 Like

Great, keep it up :ok_hand:

1 Like

Thanks for this great information mate

2 Likes

Hi, is this working for anyone properly? i get stuck where i input the BOT API token - get an error message.

4 Likes

good good :heart_eyes:

2 Likes

It’s very good thread for lerning.

2 Likes