WAX Technical How To #25

Ross Dold
EOSphere Blog

--

HeadsUp Monitoring and Alerts other than visually showing operators their node statuses on the Dashboard may also be configured to alert via Email, Telegram and Slack.

Telegram being by far the most popular in the Guild Operator space, has the ability to receive alert messages from HeadsUp using the Telegram Bot API. This is ideal for notifying a Guild of an incident when the team is AFK.

Checkout Our Public HeadsUp Showcase Dashboard

This guide will cover how to configure and start receiving HeadsUp Alerts through Telegram using the Bot API. The procedure may seem a bit tricky but it’s actually really simple and should only take a few minutes.

Configure HeadsUp Telegram Alerts

Using the Telegram Bot API and configuring the HeadsUp docker-compose.yaml the steps to receiving HeadsUp Alerts via Telegram are the following:

  1. Create and Start a new Telegram Bot
  2. Create a new Alert Group and add your Telegram Bot
  3. Obtain the Group Chat ID
  4. Configure and Restart HeadsUp

Create and Start a new Telegram Bot

Begin by connecting to BotFather the Telegram Bot API, either though a browser https://t.me/BotFather or searching for BotFather in Telegram.

Then create a new bot, by choosing a name and username. Take note of the Token used to access the HTTP API, save it and keep it safe.

In Telegram go to your newly created Bot and click START

Create a new Alert Group and add your Telegram Bot

Assign a name to your new group

Add your Telegram Bot

This will be the group from where your Guild will receive all alerts and notifications from HeadsUp. Add your Guild member Telegram accounts to this group as required.

Obtain the Group Chat ID

From within your Telegram Group run this message using your Bot username to make the Group Chat ID visible.

This is not always required, most times the Group Chat ID is instantly visible when the Bot is added to the group during creation.

/my_id@headsup_alerts_demo_bot

Then from a browser query the Telegram API with your saved Telegram HTTP API Token in the following format:

https://api.telegram.org/bot<TOKEN HERE>/getUpdates

In this example it will look like this:

https://api.telegram.org/bot7017987013:AAG3EzGxBn7-e_PR_nWUWx7I2EFvkvyvmDo/getUpdates

Be sure not to forget the /bot and /getUpdates and each end of your token.

The output will have your Group Chat ID displayed as below, take note of the Group Chat ID:

{
"update_id": 759577033,
"message": {
"message_id": 8,
"from": {
"id": 251151145,
"is_bot": false,
"first_name": "Ross",
"last_name": "(EOSphere)🇦🇺",
"username": "rossco99",
"language_code": "en"
},
"chat": {
"id": -4546176026,
"title": "Demo HeadsUp Alerts",
"type": "group",
"all_members_are_administrators": true
},
"date": 1727927284,
"text": "/my_id@headsup_alerts_demo_bot",
"entities": [
{
"offset": 0,
"length": 30,
"type": "bot_command"
}

Configure and Restart HeadsUp

Now that we have the HTTP API Token and Group Chat ID, HeadsUp may be configured with your specific details as below:

nano docker-compose.yaml

website:
environment:
- headsup_server_telegramalerts=True
- headsup_server_telegrambot=7017987013:AAG3EzGxBn7-e_PR_nWUWx7I2EFvkvyvmDo
- headsup_server_telegramchat=-4546176026

Restart HeadsUp:

docker compose up -d

You should now be receiving Alerts directly into your Telegram Group, ensure you add your relevant Guild members and test that all is working as expected.

Example HeadsUp Telegram Alert

We would appreciate any feedback or feature requests in our GitHub or please join our Telegram Group for assistance and further discussions on HeadsUp.

EOSphere Guild is a Block Producer on the WAX Protocol Network as well as many other Antelope based Blockchains.

If you find our work helpful, please vote us on the WAX Mainnet: eosphereiobp

If you prefer to proxy your vote, our proxy account is : blklotusprxy

Connect with EOSphere via these channels:

TELEGRAM | MEDIUM |YOUTUBE | FACEBOOK | TWITTER | INSTAGRAM

--

--