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

https://github.com/stuartcarnie/line2csv

Transforms InfluxDB line protocol to CSV
https://github.com/stuartcarnie/line2csv

converter csv go golang influxdb

Last synced: 7 months ago
JSON representation

Transforms InfluxDB line protocol to CSV

Awesome Lists containing this project

README

          

line2csv
========

Transform InfluxDB line protocol to CSV.

Usage
-----

Specifying both input and output files:

```bash
$ ./line2csv input.txt -o output.csv
```

Format
------

For each line, every field will generate a separate line in the CSV.

**Input:**

```text
cpu,host=foo,region=us-west-1 user=0.50,system=0.25 1000
cpu,host=foo,region=us-west-1 user=0.10,system=0.15 1001
```

**Output:**

```csv
timestamp,key,field_name,field_value
1000,"cpu,host=foo,region=us-west-1",user,0.50
1000,"cpu,host=foo,region=us-west-1",system,0.25
1001,"cpu,host=foo,region=us-west-1",user,0.10
1001,"cpu,host=foo,region=us-west-1",system,0.15
```