telegraf | Modern Telegram Bot Framework for Nodejs | Bot library

 by   telegraf TypeScript Version: v4.12.2 License: MIT

kandi X-RAY | telegraf Summary

kandi X-RAY | telegraf Summary

telegraf is a TypeScript library typically used in Automation, Bot, Nodejs applications. telegraf has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

Bots are special Telegram accounts designed to handle messages automatically. Users can interact with bots by sending them command messages in private or group chats. These accounts serve as an interface for code running somewhere on your server. Telegraf is a library that makes it simple for you to develop your own Telegram bots using JavaScript or TypeScript.

            kandi-support Support

              telegraf has a medium active ecosystem.
              It has 6785 star(s) with 856 fork(s). There are 102 watchers for this library.
              It had no major release in the last 12 months.
              There are 28 open issues and 1035 have been closed. On average issues are closed in 153 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of telegraf is v4.12.2

            kandi-Quality Quality

              telegraf has 0 bugs and 0 code smells.

            kandi-Security Security

              telegraf has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              telegraf code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              telegraf is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              telegraf releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 36 lines of code, 0 functions and 65 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of telegraf
            Get all kandi verified functions for this library.

            telegraf Key Features

            No Key Features are available at this moment for telegraf.

            telegraf Examples and Code Snippets

            No Code Snippets are available at this moment for telegraf.

            Community Discussions


            telegraf output plugin http error with TDengine
            Asked 2022-Mar-31 at 02:17

            I'm working on a monitoring system to retrieve hardware metric by telegraf and store the time-series data to TDengine.

            But seem the data insertion is very slow even making telegraf reject to work anymore.

            I got error msg like following:

            2021-12-28T11:36:14Z W! [agent] ["outputs.http"] did not complete within its flush interval

            2021-12-28T11:36:23Z E! [agent] Error writing to outputs.http: Post "http://xxxxxx:6041/influxdb/v1/write?db=bmc": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

            2021-12-28T11:36:35Z W! [agent] ["outputs.http"] did not complete within its flush interval

            2021-12-28T11:36:43Z E! [agent] Error writing to outputs.http: Post "http://xxxxxx:6041/influxdb/v1/write?db=bmc": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

            2021-12-28T11:37:02Z W! [agent] ["outputs.http"] did not complete within its flush interval

            2021-12-28T11:37:07Z E! [agent] Error writing to outputs.http: Post "http://xxxxxx:6041/influxdb/v1/write?db=bmc": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

            2021-12-28T11:37:08Z W! [outputs.http] Metric buffer overflow; 7824 metrics have been dropped

            2021-12-28T11:37:21Z W! [agent] ["outputs.http"] did not complete within its flush interval

            2021-12-28T11:37:28Z E! [agent] Error writing to outputs.http: Post "http://xxxxxxxx:6041/influxdb/v1/write?db=bmc": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

            2021-12-28T11:37:28Z W! [outputs.http] Metric buffer overflow; 14363 metrics have been dropped

            Does anyone know how to tune TDengine to work better performance?



            Answered 2022-Mar-31 at 02:17

            Edit /etc/taos/taosadatper.toml and add following lines:



            Telegraf doesn’t seem to send data to influxedb in dockerised images
            Asked 2022-Mar-26 at 18:35

            I have a dockerised telegraf (influxdata-docker/telegraf/1.21 at master · influxdata/influxdata-docker · GitHub) and influxdb (influxdata-docker/Dockerfile at master · influxdata/influxdata-docker · GitHub).

            I’m trying to send data to influxdb from ttn but without any success. The config file for telegraf is:



            Answered 2022-Mar-26 at 18:35

            Just in case somebody else has the same issue, it was finally due to the fact I was using ttn v3, ie. in telegraf.conf:

            topics = [ "v3/+/devices/+/up" ]

            instead of:

            topics = [ "+/devices/+/up" ]



            Why are some entire sub topics absent from my Telegraf MQTT data?
            Asked 2022-Mar-24 at 01:42

            I am running InfluxDB and Telegraf ingesting MQTT data into the database. I have an odd behavior where in I am missing some data that I should be ingesting with Telegraf. I'm seeing loads of MQTT data, from topics and subtopics that are siblings of the missing data, but yet some data is still missing. I'm also not seeing anything indicating an error in the logs. This is my telegraf.conf



            Answered 2022-Mar-24 at 01:42

            The answer here turned out to be that the input data_format="json" does not support booleans. I needed to upgrade to json_v2. This was not exactly clear to me how to just get the same exact behavior because the documentation wasn't really great. But I ended up with this and it works just fine.



            How can I mount configuration file and other files on AWS Fargate
            Asked 2022-Mar-23 at 18:10

            I am trying to run the Telegraf as a docker container on AWS fargate. I have created the Telegraf image file using Dockerfile and built the image and pushed it to ECR. Now, I am trying to run this image on AWS fargate.

            The main challenge I facing is how to mount the configuration (telegraf.conf) file to the container which required by container to run it. I tried following this blog by spinning two containers but I have more files that I am passing to the telegraf.conf file. Fargate provides two options to mount files using the Bind mount and EFS. I am trying to use Bind Mount but I am not sure how to provide the configuration files or mount them. I am showing below how I run the telegraf container using docker-compose.



            Answered 2022-Mar-23 at 18:10

            Bind mount on Fargate is good for sharing a folder between multiple containers in a single task, but I'm not aware of any way to load external configuration files in Fargate bind mounts, other than running a sidecar container to download those from S3 on task startup.

            I generally see EFS used for mounting a folder with configuration files in Fargate.



            Error on Telegraf Helm Chart update: Error parsing data
            Asked 2022-Mar-11 at 12:37

            Im trying to deploy telegraf helm chart on kubernetes.

            helm upgrade --install telegraf-instance -f values.yaml influxdata/telegraf

            When I add modbus input plugin with holding_register i get error

            [telegraf] Error running agent: Error loading config file /etc/telegraf/telegraf.conf: Error parsing data: line 49: key `name’ is in conflict with line 2fd

            my values.yaml like below



            Answered 2022-Mar-11 at 12:37

            Problem resolved by doing the following steps

            • deleted config section of my values.yaml
            • added my telegraf.conf to /additional_config path
            • added configmap to kubernetes with the following command



            Can I get suggestions of all possible properties of an object in TypeScript?
            Asked 2022-Feb-17 at 09:28

            I'm trying to use Telegraf (4.6.0) types and I'm having an issue with exploring possible message properties.

            Here's what I do now:



            Answered 2022-Feb-17 at 09:28

            You can flatten a union using StrictUnion as defined here This type will basically add the missing members to all union constituents with the type undefined. This will allow de-structuring to suggest all members from any constituent, but each member that is not present in all union constituents will also contain undefined (which is probably for the best from a type-safety perspective)



            Telegram Bot how to send HTML file directly?
            Asked 2022-Jan-25 at 10:22

            I created a game using HTML, now I am trying to import it in my js file, and send to user.

            This is my code so far



            Answered 2022-Jan-25 at 10:22

            As mentioned on Telegram BOT API's documentation, parse_mode of type html only supports a few tags. Therefore, you can't send your game's html file to the chat for the user with parse_mode set to html.

            Here's what the docs say:

            To use this mode, pass HTML in the parse_mode field. The following tags are currently supported:



            chat_member not getting invocked
            Asked 2022-Jan-22 at 05:09

            I am using TelegrafJS and nodejs for developing a telegram bot and I want to use "chat_member" because it returns the invite link used by the user to join the telegram group. but the problem is it is not getting invoked. when new members are joined. my primary goal is to get the invite link used by the member to join the telegram group.



            Answered 2022-Jan-22 at 05:09

            I got the solution the thing I needed to add was the launch options in the bot.launch method



            Not possible to install add-on on specifiek nodes
            Asked 2022-Jan-04 at 11:08

            We have installed Telegraf add-on for almost all the nodes in Jelastic paas environment. But for couple nodes we get the following message when we are trying to install the add-on:

            We have read the documentation of Jelastic but could not find why we are getting this message. We have tested with a basic hello world manifest but even that was not possible to install, we do get the same message.

            We have this problem for the following nodes:

            • Custom
            • PostgresSQL

            Does anyone have experience with this message an how to resolve it?



            Answered 2022-Jan-03 at 13:34

            Your Jelastic provider doesn't allow Telegraf to be installed on this type of node. You can ask them to allow that. Thanks



            Uncaught TypeError: bot.setMyCommands is not a function
            Asked 2021-Nov-09 at 13:39


            Answered 2021-Nov-09 at 13:39

            I had to type 'bot.telegram.setMyCommands()' instead of 'bot.setMyCommands()'


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install telegraf

            Telegraf instance represents your bot. It's responsible for obtaining updates and passing them to your handlers. Start by listening to commands and launching your bot. ctx you can see in every example is a Context instance. Telegraf creates one for each incoming update and passes it to your middleware. It contains the update, botInfo, and telegram for making arbitrary Bot API requests, as well as shorthand methods and getters. This is probably the class you'll be using the most.


            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • HTTPS


          • CLI

            gh repo clone telegraf/telegraf

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link