To set up a new bot, start the conversation with BotFather will help us in creating the new bot. In the next part, we will learn how to deploy the bot on websites like Heroku. Let us build a Telegram Bot that echoes the messages that we send to it. The Chat ID will be extracted from the message data.In this short tutorial, I will walk you through the steps for creating your own Telegram bot in python right from scratch. Ensure you have created a Group first, added your Bot to it, and sent it at least 1 message. You can also try this tool to get the Chat ID of your Telegram group. There should be a sample alert from Grafana inside your new Telegram group messages window. Now you can test the new Telegram contact point in Grafana using the Test button. Copy this Id into the Chat ID field in Grafana. In the JSON response, you should see a node with a message that has the type=group. (replace the XXX:YYY with the BOT API token you just got from Telegram) Then press the View Group Info option for the group, click your bot users name in the members list, and press the SEND MESSAGE button. To get this, you first need to create a group and then add the new bot to it. It will be in the form XXXXXXXXX: YYYYYYYYYYYYYYYYYYYYYYYYYYYYY You will get given a HTTP API token which is your BOT API Token to be used in Grafana. The username must end in bot and must be unique. Open Telegram, and create a new Bot by searching for and then typing /newbotįollow the prompts to create a name and username for your bot. You will need a BOT API Token and Chat ID. It will be easiest to set this up on your PC first. To do this install the Telegram app on your phone or PC. We can also add Telegram as a Contact Point for Alerting. Be quick and share withĬreate Telegram Contact Point Video Lecture Setup an Advanced Elasticsearch Dashboard Import an SNMP Dashboard for InfluxDB and Telegraf Install SNMP Agent and Configure Telegraf SNMP InputĪdd Multiple SNMP Agents to Telegraf Config Install Telegraf and configure for InfluxDBĬreate A Dashboard For Linux System Metrics Setup Grafana Metrics Prometheus Dashboard Install Prometheus Service and Data Source Install Promtail Binary and Start as a ServiceĪnnotation Queries Linking the Log and Graph Panels Install Loki Binary and Start as a Service Create MySQL Data Source, Collector and Dashboard
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |