csv-to-influxdb | Simple python script that inserts data points | SQL Database library
kandi X-RAY | csv-to-influxdb Summary
kandi X-RAY | csv-to-influxdb Summary
Simple python script that inserts data points read from a csv file into a influxdb database.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Load a csv file
- Test if value is a float
- Return True if value is a boolean
- Convert a string to boolean
- Convert a UNIX timestamp to Unix time
csv-to-influxdb Key Features
csv-to-influxdb Examples and Code Snippets
Community Discussions
Trending Discussions on csv-to-influxdb
QUESTION
I'm new to influxdb, and I trying to import some data stored in several CSV files using the telegraf agent and the file input plugin. I wrote a simple file.conf following the instructions in https://dzone.com/articles/write-points-from-csv-to-influxdb, and I was able to import the data into influxdb, both measurements and desired tags with the data inside the files.
I will like to include an additional tag with the name of the file, so I can filter measurements from a specific file, but I didn't found how to do it in the File Input plugin doc (https://github.com/influxdata/telegraf/tree/master/plugins/inputs/file), neither the CSV Parser doc (https://github.com/influxdata/telegraf/tree/master/plugins/parsers/csv).
...ANSWER
Answered 2019-Nov-13 at 21:08The files plugin does not currently support a method to add a filename tag. A standardized source tag is in the process of being added but it is not yet supported by all plugins. If you would like to see it added to the files plugin, I would suggest opening an issue with the project.
As a possible work around you could add a static tag for each file. This would require each file to have its own input section in the telegraf configuration file. Here is an example using a test json log file.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install csv-to-influxdb
You can use csv-to-influxdb like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page