Good evening everyone. This is the weirdest bug I’ve ever encountered (if it’s a bug):
I’m using Grafana V10.2.1 with a connection to my InfluxDB2.
A minimal representation of my query is the following:
This SHOULD give me for each day in the last 6 month the float-value of “YieldTotal”. However: If I look at the result, the values are correct up until September 30th. Beginning of October 1st, the values are not the precise values anymore, but are rounded to integers (and as you can see there is no such command in the query or anything).
Before you say it: NO the data is correct in the database, because if I run the same query in the interface of influxDB itself I receive the precise values, so it’s really a Grafana-thing.
But how? How can it be that Grafana decides to round to integers if the data has a _time-stamp of October and later? I’m super confused.
you are correct. That’s because I worked quite intensively with Grafana in the recent past and I cannot remember ever seeing this setting. That’s why I knew I probably should ask
That said, I will try to find it. Thanks for your hint
@yosiasz it seems that indeed I can’t find it anywhere. I’ve looked through data-source settings, in the dashboard settings (json), in Grafana-Administration I scrolled throw this huge list of settings, … Nowhere can I find anything with “decimal”, except in the settings of a single panel itself, but that does not change anything (as expected because I guess that is only affecting the final visualisation of the panel)
but I see what you’re getting at: It seems that by a stupid coincidence this “rounding” occurs not only when the month jumps to October, but also when the number becomes 3-digits…
I did not see this at the time I asked here (although it is so obvious. whoops.). That indeed sounds like a waaaay more plausible cause than the month…
The data gets inserted by telegraf. I guess that code would not be very insightful here.
But: Flux is very strict about types. If the value would be a string, then it would not be possible to e.g. add 0.1 to each value, but since this is possible, the type has to be float. I mean Flux is so strict that it even forbids adding/comparing float and int…
I’ve attached a screenshot where you can see that I can add the 0.1 (also the changed decimals)
edit: PS: This mapping which adds 0.1 does take effect, if you look at the values of September, the value actually was increased by 0.1 in comparison with the unmodified data (from the beginning of this thread)