Send alert Telegram messages to your phone using LibreNMS

NC

Do you want to receive alerts to your phone about network devices you are monitoring or not? If you want, read this article, please.

In this article, I monitor network devices with LibreNMS. To send alert messages to your phone using Telegram. If you want to send alert emails, read this article: Send alert emails with LibreNMS when monitoring network devices.

Add Device

Go to "Devices" > "Add Device", to add a host.

Send alert Telegram messages to your phone using LibreNMS

After that, go to "Alerts" > "Alert Transports".

Send alert Telegram messages to your phone using LibreNMS

Configure the alert transport

First you configure the alert transport from the Librenms system to Telegram. At the drop-down list you choose "Telegram".

Send alert Telegram messages to your phone using LibreNMS

Want to transport warnings you need information about your Telegram including token and chat id. So where do we find that information? You open Telegram with a web browser and follow me.

First you create a new Telegram bot with the help of Father bot. You name the bot then create a username for it. You will create a chat group with your bot.

Send alert Telegram messages to your phone using LibreNMS

After creating the bot you will receive a token and you will use it to configure alert transports.

Send alert Telegram messages to your phone using LibreNMS

Next is the chat id, you create a new chat group with you and your newly created bot.

Send alert Telegram messages to your phone using LibreNMS

You use the bot's username to join the chat group. You can add more members to the chat group if you want. 

Send alert Telegram messages to your phone using LibreNMS

Send alert Telegram messages to your phone using LibreNMS

So we have a chat group and alerts about monitored devices will be sent to this chat group. Want to know what the chat id is, you pay attention to the last number in the address bar when you select your chat group. Do not remove the dash in front of the number.

Send alert Telegram messages to your phone using LibreNMS

Send alert Telegram messages to your phone using LibreNMS

Add Rules

Next step we will configure what alerts we want to receive.

Send alert Telegram messages to your phone using LibreNMS

I want to receive an alert every time my monitor device loses connection. With this configuration, every time that device loses connection you will get an alert. And when that device is connected again you will receive a recovery message. That way your phone will receive a notification when the problem occurs and when the problem is fixed.

Send alert Telegram messages to your phone using LibreNMS

To check if my configuration is working properly, I will shutdown the mikrotik router device that I am monitoring. What happens when I shutdown the mikrotik router, will any alert be sent to my phone? Please wait patiently for the results, hope the message will come. The monitored device has gone from up to down. 

Send alert Telegram messages to your phone using LibreNMS

As you have seen after shutdown the mikrotik router a Telegram message is automatically sent to my phone. So you already have an automatic warning message system, good luck.

Send alert Telegram messages to your phone using LibreNMS

Facebook: https://www.facebook.com/routerbest

Twitter: https://twitter.com/routerbestcom

Tags: LibreNMS Telegram