grafana / kairosdb-datasource

Data source plugin for KairosDB
Apache License 2.0
30 stars 62 forks source link

Unexpected behavior of aggregators #27

Closed sblatnick closed 7 years ago

sblatnick commented 8 years ago

I've tried aggregate the metrics via 1 hour intervals: metric

And I would expect (like doing a LEFT JOIN in SQL), that any hours without any data will assume zero/null: null

Or instead skipped points: disjoing

But instead, I see the points connected skipping the hour: inaccurate

A major problem is, it appears during that hour, there was a value of 3, especially if you have a lot of data and don't show the points but just the lines.

I know I can get around this by submitting 0 data values for every group hourly, but that increases the data I need to submit and has the side effect of when a group leaves or has no activity for a period, then it would create a lot more lines all at 0. By supporting this option:

I hope this all makes sense. If I should file this elsewhere, let me know.

Notes:

jifwin commented 7 years ago

Hi This is very misleading. Unfortunately it is caused by KairosDB design. When there are no values in given time window KairosDB will return nothing, instead of null (or 0 for sum). Nulls would be very helpful, since we have a nice "nulls as zero" option in Grafana. I would try discussing that in: https://github.com/kairosdb/kairosdb

sblatnick commented 7 years ago

I filed https://github.com/kairosdb/kairosdb/issues/359 now. Thanks.