0
votes

influxDB and curl

Referred to this link and managed to insert 1 row into influxDB Insert line in InfluxDB using CURL

  1. Have ensured that my csv does not contain carriage returns
  2. Have ensured that there is a separate row for each data point/ measurement

Sample CSV: test A=0,B=0,C=0.02,D=0 test A=0,B=0,C=0.02,D=0

Curl command: curl -i -XPOST http://localhost:8086/write?db=mydb --data-binary @data3.csv

Any clues please? Thanks

1
Running into issues while doing bulk insert {"error":"unable to parse 'teststat A=0,B=0,C=0.02,D=0.1\rteststat A=0,B=0,C=0.02,D=0.1\rteststat A=0.1,B=0.2,C=0.02,D=0.1\rteststat A=0,B=0,C=0.02,D=0.1\rteststat A=0.2,B=0,C=0.02,D=0.1\r': invalid number"}user2545476

1 Answers

1
votes
'teststat A=0,B=0,C=0.02,D=0.1\rteststat A=0,B=0,C=0.02,D=0.1\rteststat A=0.1,B=0.2,C=0.02,D=0.1\rteststat A=0,B=0,C=0.02,D=0.1'

Should be

'teststat A=0,B=0,C=0.02,D=0.1\nteststat A=0,B=0,C=0.02,D=0.1\nteststat A=0.1,B=0.2,C=0.02,D=0.1\nteststat A=0,B=0,C=0.02,D=0.1\n'

replace the \r with \n