Problem with viewing data

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.

It’s even stranger that if you place the cursor in an area where no points are being displayed, the popup shows the value to be 1.0 (as expected)

If I set the viewing time back further, I get a similar result. Any ideas?


What is the metric interval for the underlying data?

You should be able to see the output with the query inspector. I suspect it’s due to the time($__interval) varying.

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 :confused:

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.

A few things to try:

  1. try setting the interval in the query to be 10s since that’s the interval data is being collected.
  2. in display tab, try enabling “draw mode dots” and see if the metrics show up. If they do, then
  3. try setting null value to be “connected” in the “stacked and null value” section.

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.

Hi Brian/Marcus

Sorry - been sidetracked the last couple of days :thinking: (work always seems to get in the way!)

OK so…
Brian’ suggestions:

  1. Change interval to a fixed 10s makes no difference. Even tried 20s as that’s the flush interval, just in case.
  2. Showing the points (with 10s interval) makes no difference
  3. I already had the null value set to ‘connected’ so no change

Trying Marcus’ suggestion of fill(0) shows this:

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. :anguished:

Many thanks, gents, for your input.