0
votes

I'm setting up a python-influxdb-grafana stack for monitoring an instrument.

At the moment, I'm able to collect data, process them in python, send the processed output to influxdb and then show it on grafana.

Now I'd like to know if it's possible to show the complete last dataset in grafana.

Say for example that my instrument data are Gaussian-shaped: something like

[[-5., 0], [-4.5, 0], [-4., 0], [-3.5, 0], [-3., 0], [-2.5, 
  0.0175283], [-2., 0.053991], [-1.5, 0.129518], [-1., 
  0.241971], [-0.5, 0.352065], [0, 0.398942], [0.5, 0.352065], [1., 
  0.241971], [1.5, 0.129518], [2., 0.053991], [2.5, 0.0175283], [3., 
  0], [3.5, 0], [4., 0], [4.5, 0], [5., 0]]
  • I can fit the data, get for example mu and sigma (0 and 1 in this example), send them to influxdb using the influxdb python library and show them in grafana as a function of time.

  • Now I'd like to send the whole dataset to influxdb (for example one dataset every 10 minutes) and plot it in grafana. Ideally, on grafana I'd like to be able to select a certain time and plot the corresponding Gaussian data.

Is this possible at all? I can't figure out how to store such a "big" dataset in the influxdb database, nor how to eventually plot it in grafana.

1

1 Answers

1
votes

One possible approach is to re-arrange your data - instead of

timestamp + value=array of [x,y] pairs

insert sequence of datapoints for each (timestamp,dataset):

timestamp, x as tag, y as value

This way you'll have multiple series in influxdb tagged by x. And in Graph panel set x-axis Mode option to Series

If the number of different x values is small enough and x values are equally spaced the graph will look like gaussian histogram.

Still this is not a universal and scalable solution.