Problem with panel "singlestat" and value "current"

(Marianne Spiller) #1

Hi,

perhaps, I’m understanding Grafana completely wrong in this case: I defined panels of type “singlestat”, and in options => value => stat I choosed current.

Time range for this screenshot was “last 24 hours”. I expect my dashboard to always show the current value - a stand-alone value which is not “connected” to the selected time range. Bit in fact, it is not - when I change time range to “last 30 days”, the universe explodes.

So current seems not to do what I thought of it; my questions are:

  • what does current in fact mean and
  • how can I achieve a stand-alone value which is independent from time ranges?

I’m using Grafana-4.6.3.

Thanks a lot! :slight_smile:
Marianne

(Kevin Honka) #2

Hey,

I do not know how to solve your problem, but hope to shed some light on your first Question.

current for a value, means that it uses the last available measure it got for this.
where as average defines calculates over the whole selected Timespan.

You could also try to play with the Time range overwrites, to give it a static one, which may fix your problem.

(Marianne Spiller) #3

Hi,

last available measure is what I expect, but it should be time range independent, shouldn’t it?

I also worked with time ranger overrides, but then the spark lines in background make absolutely no sense. And we love them so much :wink:

#4

One wild guess from my side
In this case it could be that Grafana is not considering every single metric by default:
image

So when you change timeranges it could be that the ‘current’ value is the latest that Grafana processed from the query which might not match the actual current value available.

Did you try to change this value and if yes how is the behaviour?

(Carsten Köbke) #5

You have to change your query. Don’t use mean(), use last() and remove the “GROUP BY” stuff and set “FORMAT AS” to table. Then you will have only last + time as options :slight_smile:

Edit: If this is the solution then baumkuchen = baumkuchen + 1 :stuck_out_tongue:

2 Likes