Timelion / how to get a number of bytes per second


(Raphael) #1

Hello,

I want to display a number of bytes par second by using TIMELION.
My query is based on a ElasticSearch datasource.

When I use the .derivative() function I will have : CURRENT VALUE - PREVIOUS VALUE.
To have a number per second I must divide this result by the interval used to get the values. The problem is that the user can change the interval.
Is there a way to get this value in the TIMELION expression input ?

For example the following query
.es('my_query').derivative().divide(5)
is correct with an interval of 5 seconds but wrong with any other interval

Regards,
Raphaƫl


Network bytes per second example
(Christian Dahlqvist) #2

You should be able to use the scale_interval function to achieve this.


(Raphael) #3

Thank you.
I should do : .es('my_query').scale_interval(1s)


(system) #4