Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can an array be the value for an influxdb entry?

I am trying to write an influxdb query such that a measurement looks like

dummydata value=1,2,3,4

and influxdb doesn't like this format. I'm guessing influxdb cannot do this, but I can't find any documentation that says it cannot, nor do I see a feasible workaround. I have to write 500 points per timestamp: it seems to me that 500 separate measurements per timestamp would get hairy quick.

So:

  1. Can influxdb accept an array/list as a value
  2. If not, is there a workaround
  3. Or is influxdb just the wrong tool for this job?

Thanks in advance.

like image 671
Dan Steingart Avatar asked Mar 06 '16 17:03

Dan Steingart


1 Answers

InfluxDB accepts strings, float64s, int64s, and booleans as field values.

it seems to me that 500 separate measurements per timestamp would get hairy quick.

That's where you are mistaken. InfluxDB 0.10+ is specifically designed to encourage multiple fields per point, where a field is a measured value. What you want to write is a point like this:

dummydata value=1,value2=2,value3=3,value4=4...

like image 65
beckettsean Avatar answered Oct 20 '22 01:10

beckettsean