Singlestat - Current value?

Is it possible to get the current value?

These are my settings and instead of value 3, I get 1.5 which is strange:



I have couple of data points in my range, I push them into ES every 20-30 seconds and I want the last one.
In Kibana I can use Top Hit and it just works.


Your using an interval of auto. If you expect average to be 3 over time then set interval to time.

I don’t want the average. I want the last value.

Even if I change that time to 1 min, I got 1.5 even if I have only one record for that 1 min period, which is 3.

I checked my data a bit more and I am sending in 2 different records into ES at the same time, like in the same second. In this case I sent in 0 and 3 with two separate requests at the same time. If I filter just to get the first data sent in, I get the 3. So is this going to give me the average when I have multiple data points in the selected time range even if I have current selected on the other tab?

Change interval to 10s and use Max of AGE. Since you’re writing metrics each 20-30s, an interval of 10s should always return the latest value.

OK that looks good! thanks.

Is there a way to get the latest value when the frequency of input is unknown? Sometimes we get with milliseconds time difference. Sometimes we get with a greater time difference

1 Like