TSVB, Value is 0 when time filter set to "Today" and "Data time range mode" set to"Last Value"

first.. i`m not good at english. Excuse me..


scenario

  • kibana v7.8.0
  • metricbeat (cpu) is running
  • Time Filter : Today
  • visulize : [ TSVB / Gauge ]
    • Data
      • Metric
        • Aggregation : Average
        • Field: system. memory.used.pct
      • Group by : Everything
    • Panel Option > Data
      • Data timerange mode : Last value
      • IndexPattern : metricbeat-*
      • Time field : @timestamp
      • interval : >=60s

I want to see the metric value of the last interval among intervals with values.

but, When i set this Scenario, result is 0.

I guess, It report interval is [23:59:00 TO 24:00:00] .
but, i want get report interval is [now-60s/s TO now/s] .

Is there any other way? (If it is an before time range also consider it.)

Your configuration looks correct. Are there values if you expand your time range?

Hi @mcarthcat

Welcome to the community....

As @Nathan_Reese said your config looks good...

Let me walk you through what is happening.

There is a very short description but it is a bit hard to understand

"This setting controls the timespan used for matching documents. "Entire timerange" will match all the documents selected in the timepicker. "Last value" will match only the documents for the specified interval from the end of the timerange."

So "Today" Mean the 24 Hour Cycle (00:00:00 to 23:59:59) in your Time Zone so let pretend it is 4 PM Local Time...

1st Click on the Time Series choice and see if you get line data...
You should but you will notice it does not go all the way accross the graph

That is because the Day is not complete...
So now click on the Gauge.... You will see 0 because that is what you asked for:

See it use the Last value. The Last Value for Today will be the average CPU from 23:50 to 23:59:59 which has not happened yet so Value Avg Value for the last 10 minutes of Today is 0 as reported. So Last Bucket for time range Today does not really make sense.

If you switch Time picker to last 24 hours you will get what you expect.

Now it uses the lass full 10 minute bucket that is available for the Average CPU...

Still following :slight_smile:

Now if you want to show the average CPU for today Up Till now...

You just select Entire Time Range and it will give the Average from the Beginning of today up untill now.

Most the time for Gauges folks are interested what the Avg / Max / Min is for the last Bucket / Time range... Or over a time range ... but when you Use Today you need to think about that Today is a specific 24 hours. (Same for This Week, This Month etc)

The size of the bucket will always be the greater of the interval set in the panel options or the interval calculated for the time series.

Hope this helps a bit....

1 Like

@stephenb Thanks for the explanation. This is a very technical nuance that is asking too much from the user to understand. I created https://github.com/elastic/kibana/issues/76251 to add some warning messages to help guide users into why they are seeing no data.

Thank you for the feedback, it is appreciated.

TSVB is a very technical visualization tool and many features in it are built for our power users, perhaps take a look at Lens, it is much simpler to use. (Drag and Drop etc).

Lens is our new visualization tool made for folks that have not been in a Kibana before, it is simpler and yet its capabilities are growing. I think if you'd use Lens first you would have got the graph you wanted within a couple minutes.

There is a quick video on it here:

@stephenb
hmm.. My geuss is right.
If so, Is it much better to show text "last interval value" than "last value"?
Thank you for response and advice.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.