{"id":5390,"date":"2024-01-17T11:18:33","date_gmt":"2024-01-17T14:18:33","guid":{"rendered":"https:\/\/blog.clusterweb.com.br\/?p=5390"},"modified":"2024-01-17T11:19:13","modified_gmt":"2024-01-17T14:19:13","slug":"prtg-com-notificacao-no-telegram","status":"publish","type":"post","link":"https:\/\/blog.clusterweb.com.br\/?p=5390","title":{"rendered":"PRTG com Notifica\u00e7\u00e3o no Telegram"},"content":{"rendered":"<div class=\"votebox\">\n<div class=\"votes\">\n<h1 class=\"style-scope ytd-watch-metadata\"><span style=\"font-size: 18pt;\">Tutorial PRTG com Notifica\u00e7\u00e3o no Telegram (API Bot) Monitoramento Rede Telegram.<\/span><\/h1>\n<\/div>\n<\/div>\n<div class=\"text\">\n<p>&nbsp;<\/p>\n<p>At a older article i created a telegram bot with Linux but now its much easyer to do this.<\/p>\n<p>&nbsp;<\/p>\n<p>1. First you must create a telegram account and add BotFather to you list. To do this click on the following url:\u00a0<a href=\"https:\/\/telegram.me\/botfather\" target=\"_blank\" rel=\"nofollow external noopener\">https:\/\/telegram.me\/botfather<\/a><\/p>\n<p>2. Genrate a new bot with the command &#8220;\/newbot&#8221; 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 &#8220;\/help&#8221;)<\/p>\n<p>3. Add your bot to telegram with the following url<\/p>\n<pre>http:\/\/telegram.me\/&lt;botname&gt;\r\n<\/pre>\n<p>and send some text to the bot.<\/p>\n<p>4. Now copy your token code and go to the following page in chrome:<\/p>\n<pre>https:\/\/api.telegram.org\/bot&lt;tokencode&gt;\/getUpdates\r\n<\/pre>\n<p>5. You see a json code with the message you sent to the bot. Copy the Chat id. In this example that is \u201c-9787468\u201d<\/p>\n<pre>\"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\"}}]}\r\n<\/pre>\n<p>6. Now create a new notification (setup -&gt; account settings -&gt; notifications). Check the \u201cExecute http action\u201d and put the following url in the box:<\/p>\n<p>URL:<\/p>\n<pre>https:\/\/api.telegram.org\/bot&lt;tokencode&gt;\/sendMessage\r\n<\/pre>\n<p>Postdata:<\/p>\n<pre>chat_id=&lt;chatid&gt;&amp;text=PRTG: %status %shortname %device :: %probe -- %group -- %commentsdevice\r\n<\/pre>\n<p>Now save the config and test it.<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<p><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/9diaBN-IC9s\" width=\"560\" height=\"314\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tutorial PRTG com Notifica\u00e7\u00e3o no Telegram (API Bot) Monitoramento Rede Telegram. &nbsp; At a older article i created a telegram bot with Linux but now its much easyer to do this. &nbsp; 1. First you must create a telegram account and add BotFather to you list. To do this click on the following url:\u00a0https:\/\/telegram.me\/botfather 2. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[730,1,256,42,439,495,68,102],"tags":[1001,1605,349,179,361,1604,1602,214,1603,94,983],"class_list":["post-5390","post","type-post","status-publish","format-standard","hentry","category-clusterweb","category-viazap","category-desktop","category-leitura-recomendada","category-midia","category-profissional-de-ti","category-redes-2","category-windows","tag-api","tag-bot","tag-com","tag-monitoramento","tag-no","tag-notificacao","tag-prtg","tag-rede","tag-telegram","tag-tutorial","tag-with"],"_links":{"self":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/5390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5390"}],"version-history":[{"count":1,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/5390\/revisions"}],"predecessor-version":[{"id":5391,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/5390\/revisions\/5391"}],"wp:attachment":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}