Set up your DAppNode Telegram bot

Setup

Notelist (take note of the items below while following this guide)

  • Bot token
  • Bot name

There are a few steps you must follow to set up your telegram bot and receive notifications from your DAppNode:

  1. Create a bot: create a telegram bot following this [guide]
    (Bots: An introduction for developers)
    You will have to set a botname for your bot.

  2. Get the bot token: get a new token for your bot following this guide

  3. Create a new channel, add the bot as admin:
    Right after the bot creation, the bot father will send you a message with the details about your bot (token and a link to a new channel with your bot). To create a new channel click on the link highlighted in the image.


    There is also the possibility to create a new channel inside the telegram App.
    Screenshot from 2021-01-19 13-14-49
    Then add the bot to the channel as admin using the botname (i.e dappNodeAlerts) you configured in step 1.

  4. Set the bot token in the UI: connect to your DAppNode and go to System > Notifications
    Add the bot token in the empty field and click submit.

  5. Switch ON the bot: users will be able to switch the bot status, to receive notifications switch it ON.
    Screenshot from 2021-01-19 13-50-46

  6. Subscribe to the channel ID: in this last step you will have to write whatever message in the channel (step 3) to allow the bot to register the channel ID. The bot can be subscribed to multiple channel.

Commands

Commands must be preceded by ‘/’. Every command registered carries an action so take it into account before writing it.

Notifications

The telegram bot, when enabled, is automatically subscribed to important notifications that happen in your DAppNode:

  • Disk alert: there is a disk space security protocol in DAppNode to avoid crash all of the services. When the disk space is less than 5GB you will receive a notification in either your DAppNode UI and your telegram bot. When the disk space is less than 1GB every non-core service will be stopped and you will receive a notification in either DAppNode UI and your telegram bot.
  • Geth synced: when your Geth node is synced you will receive a notification in the DAppNode UI and your telegram bot.

There will become more notifications shortly, such as:

  • Package update: get a notification when there is a new package version available in the DAppStore.

Requirements

  • DAPPMANAGER version: 0.2.38 or more
  • Telegram account
  • Telegram bot configured

Security tip

By default, any bot can be added to a group. To disable this default configuration, go to Bot Father chat and follow the instructions in the image below:

5 Likes

Hello DAppNode team,

I really like this feature. That is a great idea!
Have you considered integrating more priority notifications? Alerts for issues that require attention to get DAppNode and/or it’s DApps running smoothly again.
For example:

  • Geth/Prysm/etc no longer synced for x period of slots or time,
  • CPU/RAM excessively high for a period of time,
  • Package has stopped running

Thanks
Dylan

2 Likes

Those are great ideas!

Let see how it works in this release. Will take into account your suggestions for the next release.

2 Likes

I agree. Maybe down the road there could be an option for a more verbose bot that provides non-critical information from time to time. Just a thought.

2 Likes

This is a great suggestion. Downtime of the validator is an opportunity cost. Any tool that allows us to stay live is a good tool to have. Loving my DappNode. Thanks!

2 Likes

So I did this, but the bot I created can be queried by anyone in the world with Telegram. You don’t need to add it to a group and disabling the ability to add it to a group isn’t improving security much. Just search for the bot on an unrelated account and type /start and that’s it! Everyone can set autoupdates on or off this way and everyone can get notifications from your bot without you knowing it. Every feature added to this bot willbe available to everyone.

It doesn’t seem safe at all.
Or is there some setting I missed?
For now, I removed my bot.

1 Like

is there any update from @MeganerdNL s post above?

I set up the TELEGRAM BOT fine, and sent test messages fine - but when I powered down my unit for an hour to test the power-outage notification I got nothing - it was a pure “pull the plug out of the wall” test – but no notification was ever sent to my TELEGRAM - I then rebooted and did a manual “SEND TEST MESSAGE” and it worked fine, but didn’t notify me of power outage - any ideas?

The telegram bot is hosted by your dappnode, so if your dappnode is powered down, it can’t send you any messages. For monitoring downtime, you are better off with Ethical Metrics!

We also have a telegram option on the pipeline for Ethical Metrics, but for now it’s email only.