Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue formatting data for inserting strings into influxdb

Tags:

influxdb

I am not understanding the format needed to insert data.

Why doesn't test a=dog,b=0,c=nice work?

On the site, I see that <measurement>[,<tag-key>=<tag-value>...] <field-key>=<field-value>[,<field2-key>=<field2-value>...] is the format to follow.

I also am reading you can have 0-many tags (in the above example I have zero tags)

Not sure what I am violating or why the error I keep getting is {"error":"unable to parse 'test a=dog,b=0,c=nice': invalid boolean"}

Who said anything about a boolean!?

like image 710
bagnina Avatar asked Jul 26 '16 15:07

bagnina


People also ask

What is the default precision for inserting data into InfluxDB?

The minimum valid timestamp is -9223372036854775806 or 1677-09-21T00:12:43.145224194Z . The maximum valid timestamp is 9223372036854775806 or 2262-04-11T23:47:16.854775806Z . As mentioned above, by default, InfluxDB assumes that timestamps have nanosecond precision.

How does Python write data to InfluxDB?

Write data to InfluxDB with Python In your Python program, import the InfluxDB client library and use it to write data to InfluxDB. Define a few variables with the name of your bucket, organization, and token. Instantiate the client. The InfluxDBClient object takes three named parameters: url , org , and token .

How do I write in InfluxDB?

Write points from a file by passing @filename to curl . The data in the file should follow the InfluxDB line protocol syntax. Note: If your data file has more than 5,000 points, it may be necessary to split that file into several files in order to write your data in batches to InfluxDB.


1 Answers

Try this,

test a="dog",b=0,c="nice" 
like image 120
Rugaloo Avatar answered Oct 16 '22 22:10

Rugaloo