-
Notifications
You must be signed in to change notification settings - Fork 69
Example for monotonic counters? #18
Comments
Hi, You're welcome to raise more questions on our community space where similar Qs have been raised and answered. Thanks |
Nope, doesn't help. What I'm saying is that I want to chart things that increase continuously (like packet counters) on a per-interval basis (i.e., plot only differences between successive values over time, and not the absolute value). |
@rcarmo isn't there always a counter based a certain timespan like total xy per second?! |
@rs38 No, per-interval counters aren't always available. And when dealing with networking, it is often critical to be able to be able to bin the data for cross-referencing with other event types, and avoid averages (which is why I opened this ticket in the first place). To this date, I have not yet been able to do this solely inside Log Analytics - I've had to export the data and post-process it. |
@rcarmo this should work for you. I'm curious if there are some more elegant ways….?!
nesting the let function is also supported:
|
@rcarmo if the time bins are regular, you can try a make-series to turn the data points into an array. Then, you can apply a finite impulse response filter with series-fir to compute the differences between immediate rows. For this, your finite impulse response filter should be something like dynamic([-1, 1]) or dynamic([1, -1]). Finally, if you would like to turn the resulting array into a table, you can use mvexpand. If you do end up using mvexpand, make sure that in the in the mvexpand statement you set the "limit" clause to a high number, since by default it truncates at 128 rows. That was one option. Another option is to try an approach similar to what @rs38 recommended, or you can experiment with the prev or next functions. |
@jruales Wow! I guess only knowing about the exitence of the function prev() did the trick!
it would be very helpful to have something that helps finding these by translating SQL command. in this case LAG().... |
I'm trying to plot "Network Total Bytes" (which is a monotonic counter), and need a way to compute the deltas inside time bins and extrapolate total traffic per bin (or per second).
Any simple way to do that?
The text was updated successfully, but these errors were encountered: