Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sj14/lineprotocol
Convert CSV files to InfluxDB and Kapacitor readable files
https://github.com/sj14/lineprotocol
csv influxdb kapacitor
Last synced: about 1 month ago
JSON representation
Convert CSV files to InfluxDB and Kapacitor readable files
- Host: GitHub
- URL: https://github.com/sj14/lineprotocol
- Owner: sj14
- Created: 2017-09-04T11:33:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-04T11:48:28.000Z (over 7 years ago)
- Last Synced: 2024-12-09T17:06:22.360Z (about 2 months ago)
- Topics: csv, influxdb, kapacitor
- Language: Go
- Size: 2.93 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CSV to Lineprotocol
This is a simple tool to convert CSV files to Lineprotocol files which are readable by InfluxDB or Kapacitor.
The CSV file to read should be formatted like:
```
timestamp0,measurement0
timestamp1,measurement1
timestamp2,measurement2
...
```The available flags are:
```
-db string
database name (only for replay file) (default "mydb")
-importFile
create an influx import file (.txt)
-input string
CSV file or directory to convert (default "path/to/file.csv")
-output string
output directory (default "converted/")
-replay
create a replay file (.srpl)
-rp string
database retention policy (only for replay file) (default "autogen")
-table string
table name (default "table_test")
-time
Add a fake timestamp to the data
```
The converted `.txt` file can be imported by InfluxDB with `influx -import -path=FILENAME.txt` and `.srpl` replay files can be imported by Kapacitor (have to be moved to Kapacitors recordings directory)