Can any one suggest what may be happening here. I have some data that I have to display in a graph ('cos that’s the only way I can get alerts), which seems to display differently depending on the view.
Given that all the data in the Influxdb has not changed and the only thing that has changed is the time view, why do I see different data? The first graph clams that there is no data before 12:41:30 when viewing for the last 15 minutes, but the second one, for last 30 mins, shows there’s plenty of data at that time but nothing before 12:26:30.
Thanks for replying Brian. Still a bit of a newbie at time-series databases. So wasn’t sure what you meant. However, on inspection, the inspector shows:
SELECT last(“autot_status”) FROM “autot_1” WHERE time >= now() -10m GROUP BY time(2s) fill(null)
so where does the ‘2s’ come from?
Interesting enough, when I reloaded the Grafana web page this morning it looked fine but as soon as I zoomed in again it showed similar situation. The interval value is 10s with a flush_interval of 20s. The more I look at this the more confused I get
The time(2s) is being auto-generated based on the time window you have selected.
What is the metric time interval of the data itself though - whatever is sending metrics to influx should be sending it at some regular interval (could be 10s, could be 60s, or longer).
If you set the time($__interval) to time(60s) what happens? (if you can match the interval of the data being sent the results should be what is expected).
As mentioned, telegraf is sampling every 10s (interval=10s) but sending back data every 20s (flush_interval = 20s)
What i don’t understand is why, when you hover the mouse over the blank part to the left, the popup states that there is data there so why doesn’t it display it? I’m fairly sure the client’s going to ask the same question so I need a convincing answer.
If you change to fill(0) does that make a difference? Suspect you have nulls in your response from influxdb - you can easily see this using the query inspector.
As @bkgann suggests, you can also configure the Min time interval (write frequency) globally in the datasource configuration.
This is also shown if I set the null value to ‘null as zero’. So it looks like that the data does contain nulls - but can’t quite figure out why, if I expand the viewing window, it still shows no data before a certain point, which I guess is where a null value is. But this null value appears to ‘move’ depending on the data being shown.
I do find the concept of ‘no nulls’ really difficult, not just from a storage view but from a DBA viewpoint. I can understand why Influx doesn’t want to store a null value but then it seems to create all sorts of other issues when trying to display/manipulate the data.
I “can” live with it, particularly as I now have something to explain why it’s doing it. We already have explained about sampling data and display update intervals to the client so hopefully that will suffice but it will still niggle me.