Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:notification_groups [2017/08/24 11:02]
vincenzo [Telegram Notifictions]
en:notification_groups [2023/05/15 18:28] (current)
admin
Line 9: Line 9:
   * Telegram: the message will be delilvered to a specific Telegram user account   * Telegram: the message will be delilvered to a specific Telegram user account
  
- 
----- 
  
  
Line 16: Line 14:
  
 The steps to create a Telegram Notification are: The steps to create a Telegram Notification are:
 +  - Create a channel to Telegram and a bot
 +  - Configure the channel to NeMo
 +  - Create the Notification group
 +  - Testing the notification group
  
-1. Create a channel to Telegram and a bot 
  
-2. Configure the channel to NeMo+==== Create a channel to Telegram and a bot ====
  
-3. Create ​the Notification group+  * //Fisrt step// is to create a channelTelegram members will join to the channel to read the Telegram nofitication sent by NeMo through the bot ([[https://​telegram.org/​faq_channels]]). For more information about bot please visit [[https://​core.telegram.org/​bots]]
  
 +  * //Second step// is to create a bot to add as administrator member of the channel. Open Telegram BotFather and create the bot with the command **/start** and follow the instruction. Here is an example of a bot creation:
  
 +{{ :​notification-telegram4.png?​nolink&​500 |}}
  
-**Create a channel ​to Telegram and a bot** +  ​//Third step// add the bot to the channel.
  
-//Fisrt step// is to create a channel. ​Telegram members will join to the channel ​to read the Telegram nofitication sent by NeMo through the bot ([[https://​telegram.org/​faq_channels]]):+  * //Fourth ​step// is retrieving the chat_id of the channel. ​With the NeMo shell (or any other linux machine) you need to find the chat_id related ​to the channel:
  
-For more information about bot please visit [[https://​core.telegram.org/​bots]] +<code
- +curl https://​api.telegram.org/​bot<​ADD the Token here>/​getUpdates?​offset=0
- +
-//Second step// is to create a bot to add as administrator member of the channel. Open Telegram BotFather and create the bot +
- +
-/start +
-/​newbot ​<choose the name and the username of the bot that will be configured on NeMo –note the username must end with bot> +
- +
-[[http://​docs.observium.org/​alerting_transports/#​telegram +
-]] +
- +
-Add the bot to the channel. +
- +
-Retrieving the chat_id of the channel: +
- +
- +
-With the NeMo shell (or any other linux machine) you need to find the chat_id related to the channel: +
- +
-curl https://​api.telegram.org/​bot**<ADD the Token here>**/​getUpdates?​offset=0+
  
 {"​ok":​true,"​result":​[{"​update_id":​611548852,​ {"​ok":​true,"​result":​[{"​update_id":​611548852,​
-"​channel_post":​{"​message_id":​2,"​chat":​{"​id":​**-1001148557862**,"​title":"​Channel-test","​type":"​channel"​},"​date":​1499934011,"​text":"/​my_ip","​entities":​[{"​type":"​bot_command","​offset":​0,"​length":​6}]}}]}[+"​channel_post":​{"​message_id":​2,"​chat":​{"​id":​**-1001148557862**,"​title":"​Channel-test","​type":"​channel"​},"​date":​1499934011,"​text":"/​my_ip","​entities":​[{"​type":"​bot_command","​offset":​0,"​length":​6}]}}]} 
 +</​code>​
  
 In this case the chat id is: **-1001148557862** In this case the chat id is: **-1001148557862**
- 
----- 
- 
-**Now you are ready to configure telegram notification to NeMo. ** 
- 
-1. On Admim tab, select Configuration/​Notification Groups/​Telegram Channels 
-{{:​en:​notification-telegram1.png?​200|}} 
- 
-2. Click Add Channel 
  
  
-3. insert the Name of the channel ​that will be used on NeMo, the description,​ the chat identifier and the Bot Token +==== Configure ​the channel ​to NeMo ====
-{{:​en:​notification-telegram2.png?​200|}}+
  
-4. Create a new notification group (Configuration/​Notification Groups->​Add Group) and save changes 
  
-5Select ​the notification group and click Edit Group button+  - On Admim tab, select Configuration/​Notification Groups/​Telegram Channels {{ :​en:​notification-telegram1.png?​nolink&​500 |}} 
 +  - Click Add Channel and insert ​the Name of the channel that will be used on NeMo, the description,​ the chat identifier ​and the Bot Token {{ :​en:​notification-telegram2.png?​nolink&​400 |}}
  
-6. +==== Create the Notification group ====
  
-{{:​en:​notification-telegram3.png?​200|}}+  - Create a new notification group (Configuration/​Notification Groups->​Add Group) and save changes 
 +  - Select the notification group and click Edit Group button ​{{ :​en:​notification-telegram3.png?​nolink&​400 ​|}} 
 +  - select the tab Members and select Telegram as method 
 +  - Select the Telegram channel
  
-4. select the tab Members and select Telegram as method 
  
-5. Select the Telegram channel 
  
-**Testing the notification group**+==== Testing the notification group ====
  
-The administrator of the telegram group must add users that want to receive notification in the group, then select the notification group and click Send Test button+The administrator of the telegram group must add users that want to receive notification in the group, then select the notification group on NEMO and click **Send Test** button.
  
 //​Congratulations,​ you have created your Telegram Notification group!// //​Congratulations,​ you have created your Telegram Notification group!//