Added documentation on using groups in telegram transport (#9355)

* Telegram - group

Just added a small addition, to make the Group Chat receive alerts work.

* Update Transports.md
This commit is contained in:
Luciano Santos
2018-10-20 17:18:26 -03:00
committed by Neil Lathwood
parent e5f7969dc6
commit 2e34c73c62

View File

@@ -413,17 +413,19 @@ Each fault will be sent as a separate syslog.
2. Generate a new bot with the command "/newbot" BotFather is then asking for a username and a normal name. After that your bot is created and you get a HTTP token. (for more options for your bot type "/help")
3. Add your bot to telegram with the following url: `http://telegram.me/<botname>` and send some text to the bot.
3. Add your bot to telegram with the following url: `http://telegram.me/<botname>` to use app or `https://web.telegram.org/<botname>` to use in web, and send some text to the bot.
4. The BotFather should have responded with a token, copy your token code and go to the following page in chrome: `https://api.telegram.org/bot<tokencode>/getUpdates`
(this could take a while so continue to refresh until you see something similar to below)
5. You see a json code with the message you sent to the bot. Copy the Chat id. In this example that is “-9787468”
`"message":{"message_id":7,"from":"id":656556,"first_name":"Joo","last_name":"Doo","username":"JohnDoo"},"chat":{"id":-9787468,"title":"Telegram Group"},"date":1435216924,"text":"Hi"}}]}`
5. You see a json code with the message you sent to the bot. Copy the Chat id. In this example that is “-9787468” within this example:
`"message":{"message_id":7,"from":"id":656556,"first_name":"Joo","last_name":"Doo","username":"JohnDoo"},"chat":{"id":-9787468,"title":"Telegram Group"},"date":1435216924,"text":"Hi"}}]}`.
6. Now create a new "Telegram transport" in LibreNMS (Global Settings -> Alerting Settings -> Telegram transport).
Click on 'Add Telegram config' and put your chat id and token into the relevant box.
7. If want to use a group to receive alerts, you need to pick the Chat ID of the group chat, and not of the Bot itself.
[Telegram Docs](https://core.telegram.org/api)
**Example:**