Telegram is a free chat service with an API supporting Push notifications on Android and iOS.

NEMS Linux includes notify_host_by_telegram and notify_service_by_telegram.

It's fairly simple to setup, as long as you have your device (ie., smartphone) and a computer/laptop handy.

1) Install the free Telegram app on your device.

2) Run the app and follow the simple on-screen prompts to activate a Telegram account (it's free).

3) Create a new message and search for botfather.

4) Click on the BotFather bot result, and then click Start at the bottom of your app screen.

5) Click `/newbot` and then type a name for your bot. NEMS Linux is one idea.

6) Choose a username for the bot, which must end in the word bot. For example, you could call it mycoolbot, mycoolbot_bot or even mycool_bot. I might consider BaldNerdNEMS_bot as my bot username.

7) If all went well, you will then receive an in-app notice that says “Done. Congratulations on your new bot.” followed by some information. In particular, you'll need to remember your bot name (created in the step above) and the API token.

8) Click back followed by the hamburger menu then choose New Group.

9) Search for the bot you just created just as if it was a person, and click it to add the bot to your new group.

Click your bot's name from the search results, followed by the right arrow to proceed to the next screen.

10) Enter a name for your group and click the checkmark to save.

11) On a computer, open the URL https://web.telegram.org/ and sign in with the phone number you used to activate your Telegram account.

12) Click on the group chat you added your bot to and look at the address bar. It will have a URL such as https://web.telegram.org/#/im?p=gXXXXXXXXX - hold on to that info (Chat ID: gXXXXXXXXX)

13) On your NEMS Server, open NEMS SST and add your bot API Token and Chat ID to the Telegram Account Info section on the Notifications tab.

14) Finally, open NEMS NConf and modify your Contacts (Contacts → Show → Modify). Add notify_host_by_telegram and notify_service_by_telegram appropriately. Save, and generate your Nagios Config.

Thanks to baggins for contributing this feature and Vincenzo Di Iorio for assisting with this documentation.

  • usage/notify-host-by-telegram.txt
  • Last modified: 2019/09/06 11:38
  • by Robbie Ferguson