Hi all!
This is my first post here. I stuck in a problem with a histogram. I’m using the latest version (9.4.3) of Grafana and my data source is an InfluxDB 1.8.10, all running in docker containers.
In the InfluxDB I have a measurement with 70 fields. Every field is representing a bucket of a histogram. I tried to create a panel to display the full histogram (last or mean of the last x seconds) but with no efford.
First I tried it with the Bar-Graph-Panel, but this will not work, since it display data allways over time.
The histogram panel trys allways to calculate his own histogram out of the single querys, and the heatmap panel is also not working.
Hi grant2!
The query or queries are part of the problem. I can simply query a couple of buckets with a cuple of queries:
SELECT last(“h_0085”) FROM “modbus” WHERE (“slave_id” = ‘15’) AND $timeFilter GROUP BY time($__interval) fill(null)
SELECT mean(“h_0170”) FROM “modbus” WHERE (“slave_id” = ‘15’) AND $timeFilter GROUP BY time($__interval) fill(null)
an so on.
But then I get a group of single buckets from a histogram. I tried to combine the fields with the ‘Concatenate’ transform, but this won’t work for 70 fields (or I’m missunderstanding the usage of this transform).
The ‘Bar gauge’ panel could possibly do the trick, but I get it not working to show of more than six fields in a vertical orientation. I can rescale the panel in every manner, at last is the view reduced to the first six fields from 70.
Just to be clear, the 70 fields that you mention are h_0085, h_0170, etc., correct?
And you want one single histogram, right? Can you sketch out using Excel or whatever you want an example of what the finished histogram should look like, clearly labeled with these 70 fields? I am having trouble envisioning what you are after. When I think of a histogram, I think of 2 parameters (e.g. number of people and the height of each person) displayed like this:
Hi!
Yes, it’s something similar. The complete set of fields give a Particke Size Distribution from an inline particle size analyzer. It gives me every 2 seconds a Q0 complete size distribution in the range from 0 to 6800µm with mono sized bins of 85µm.
This is what I get with the bargraph gauge:
It’s not that bad, but it only work, if I average the bins over a minimum of a minute or so. If I try to get just the last value, the panel changes to:
and that’s not what I like.
At most, I would like a real histogram like in your example. But the example is calculated an visualized with the histogram panel. To get this I would need a single data field, with discrete single particle sizes. Then the ‘histogram panel’ could calculate a histogram. But the histogram is allready calculated and just want to display it.
Sorry, but I am not well versed in InfluxQL and your situation (where you are receiving a full size distribution every 2 seconds) sounds like it may require some data manipulation and/or querying to get what you want out of it. Good luck!