justin_rowles Jun 14, 2016 3:16 AM
I have a dashboard which has every single stat on it marked with a warning "Using rate on a non-counter expression". But in fact, these are counter expressions. Is there any way I can wrap the time series in a function to get rid of this, or make it go away by some other means? My management don't like having warnings on their main dashboard, it scares them!
jason_goocher Jun 14, 2016 7:37 AM (in response to justin_rowles)
Could you share the dashboard link with us justin_rowles? I want to take a look at the data before I suggest a solution. I tend to see that message often when an aggregate function, such as sum(), is applied to the raw data before rate(). However it's hard to say that's the case here without seeing the data first.
Thanks!
justin_rowles Jun 14, 2016 8:46 AM (in response to justin_rowles)
Here you go...
https://connectedhome.wavefront.com/dashboard/dp-management-prod
1 of 1 people found this helpful
justin_rowles Jun 15, 2016 2:13 AM (in response to justin_rowles)
Thanks for that. I originally put the lag() wrapper in because I was seeing some odd behaviour where the reported value for 'now' was zero, but changed to a (correct) non-zero value when it was a few seconds old.
I notice that I'm not seeing that any more, so I might be able to simply remove the lag call altogether.
I'd appreciate any info about what I was seeing - if it was a known problem that is now not going to happen again, or if you haven't ever seen that behaviour?
justin_rowles Jun 16, 2016 3:01 AM (in response to justin_rowles)
Actually I've just retested - without the lag, on that dashboard, as every minute boundary passes, my 'blobs' turn red. With the lag, they don't.
Any advice on how to resolve that without using lag() would be excellent.
jason_goocher Jun 16, 2016 8:23 AM (in response to justin_rowles)
For this use case, I believe leaving the lag(10s,) in the equation, but moving it outside of the rate() function -- e.g. lag(10s, rate()) -- is the proper technique. My assumption is that the blobs that turn red are using some type of aggregate function with mcount(). There are times when the dashboard updates, but the next set of points have not been reported yet. This causes the mcount() value to be 0 temporarily. The 10 second lag you are applying is providing an additional 10 seconds of time for the points to report, and therefore stops the mcount() from being 0 temporarily. While you could leave the lag(10s,) as it is now, moving it to the outside of the rate() function will help to eliminate those error messages you referred to in the initial post.
Hope this helps!
jason_goocher Jun 20, 2016 11:00 AM (in response to jason_goocher)
Hey justin_rowles, I wanted to quickly confirm whether my most recent response helped to answer your question. Please let me know if I can offer additional assistance!