1
votes

Getting below error while inserting data.

 curl -i -XPOST 'http://localhost:8086/write?db=nagflux' --data-binary 'metrics,host=server1,service=Linux CPU check,command=check_Linux value=2.87 1505131200'                     

HTTP/1.1 400 Bad Request Content-Type: application/json Request-Id: 95e6a324-3d69-11e8-b00f-000000000000 X-Influxdb-Build: OSS X-Influxdb-Error: unable to parse 'metrics,host=server1,service=Linux CPU check,command=check_Linux value=2.87 1505131200': invalid field format X-Influxdb-Version: 1.4.2 X-Request-Id: 95e6a324-3d69-11e8-b00f-000000000000 Date: Wed, 11 Apr 2018 09:20:33 GMT Content-Length: 141

{"error":"unable to parse 'metrics,host=server1,service=Linux CPU check,command=check_Linux value=2.87 1505131200': invalid field format"}

1

1 Answers

1
votes

Found that Error due to space in the tag value service=Linux CPU check.Correct format is

curl -i -XPOST 'http://localhost:8086/write?db=nagflux' --data-binary 'metrics,host=server1,service=Linux\ CPU\ check,command=check_Linux value=2.87 1505131200'