Hello I am using grafana and influxdb. If I already have pre-bucketed histgram data like this:
“histogram”: [
{ “mark”: 0.000265723, “count”: 1, “frequency”: 0.010416666666666666 },
{ “mark”: 0.000785212, “count”: 67, “frequency”: 0.6979166666666666 },
{ “mark”: 0.001304701, “count”: 17, “frequency”: 0.17708333333333334 },
{ “mark”: 0.0018241899999999998, “count”: 5, “frequency”: 0.052083333333333336 },
{ “mark”: 0.0023436789999999996, “count”: 0, “frequency”: 0 },
{ “mark”: 0.0028631679999999993, “count”: 0, “frequency”: 0 },
{ “mark”: 0.0033826569999999994, “count”: 0, “frequency”: 0 },
{ “mark”: 0.0039021459999999996, “count”: 0, “frequency”: 0 },
{ “mark”: 0.004421634999999999, “count”: 1, “frequency”: 0.010416666666666666 },
{ “mark”: 0.004941123999999999, “count”: 2, “frequency”: 0.020833333333333332 },
{ “mark”: 0.005460613, “count”: 3, “frequency”: 0.03125 }
]
mark is the upper bound of the bucket. technically the histogram data is all for 1 point in time.
What’s the best way to insert that into influxdb using line protocol and then query it to display it as a histogram in grafane? I can’t get it to work no matter what I try.
I’ve tried for inserting as:
my_histogram mark=0.000265723,count=1 timestamp
my_histogram mark=0.000785212,count=67 timestamp
if I use the same timestamp, then it seems to only insert one data point into influxdb. I’ve also tried just increasing the timestamp by a ms and that inserts it, but I can’t seem query it properly in grafana for charting.
I’ve even tried inserting things like
my_histogram mark=0.000785212,count=1 timestamp
my_histogram mark=0.000785212,count=1 timestamp + 1ms
my_histogram mark=0.000785212,count=1 timestamp + 2ms
…
where for example this mark would have 67 lines (the total for this bucket) each one being +1 ms. And then querying that so that the count of the same mark would be the count for each line for the bucket, but I couldn’t get the chart properly.
Any help would be appreciated. Thanks!