Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)