Influxdb: Write with multiple values in influxdb using HTTP API

Created on 29 Aug 2016  路  2Comments  路  Source: influxdata/influxdb

For the below command i am getting "total" and "used" like a string with double quotes and i dont want quotes.

I am using 0.13.0 Version influxdb

Query:
curl -i -XPOST 'http://influxdb:8086/write?db=metrics' --data-binary 'cpu,hostname=localhost,total=100,used=10 free=90'

Output:
select * from cpu
time Hostname Total Used Free
2016-08-29T18:05:06.515298566Z "localhost" "100" "10" 90

Desired Output:
select * from cpu
time Hostname Total Used Free
2016-08-29T18:05:06.515298566Z "localhost" 100 10 90

Most helpful comment

Any key-value pairs before the space are considered to be tags. Any pairs after the space are fields.

You need to write your data as
cpu,hostname=localhost total=100,used=10,free=90

See https://docs.influxdata.com/influxdb/v0.13/write_protocols/write_syntax/

All 2 comments

Any key-value pairs before the space are considered to be tags. Any pairs after the space are fields.

You need to write your data as
cpu,hostname=localhost total=100,used=10,free=90

See https://docs.influxdata.com/influxdb/v0.13/write_protocols/write_syntax/

I think the above documentation explains this very well. Thank you @dswarbrick.

@viswa-devops947 if you have any further questions, please take them to the mailing list. The issue tracker is only for features and bug reports. Thanks.

Was this page helpful?
0 / 5 - 0 ratings