PRTG com Notificação no Telegram

Tutorial PRTG com Notificação no Telegram (API Bot) Monitoramento Rede Telegram.

 

At a older article i created a telegram bot with Linux but now its much easyer to do this.

 

1. First you must create a telegram account and add BotFather to you list. To do this click on the following url: https://telegram.me/botfather

2. Genrate 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.

4. Now copy your token code and go to the following page in chrome:

https://api.telegram.org/bot<tokencode>/getUpdates

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"}}]}

6. Now create a new notification (setup -> account settings -> notifications). Check the “Execute http action” and put the following url in the box:

URL:

https://api.telegram.org/bot<tokencode>/sendMessage

Postdata:

chat_id=<chatid>&text=PRTG: %status %shortname %device :: %probe -- %group -- %commentsdevice

Now save the config and test it.

 

Rolar para cima