Basic Elastic Search Query

hello, i’m biginnig with grafana, i’ve configured my data source Elastic!
I wan’t to establish a graph ta shows the percentile of my http status ( to have for example 50% status 200, …)

Help plzz !

@kaoutar There is a percentiles option in the query editor:


If the two timestamps are in epoch format, one can be assigned as a variable in templating and use that variable in the script to find the difference.

P.S: I used to find the difference between start and end time for a particular stage in my process.

hii all,


Why I used (_value/doc[‘accessStatus’].value)*100 it wasnot work correct?

the result is same with: _value*100

Metric SUM:
in script: if we push _value100/doc[‘acessStatus’].sum()
we have the same value when we push: _value

Thank you

Hi Guys,
How do i recieve latency between two nodes in Grafana from Elasticsearch ?

@michaelaeino can you please provide a screen shot on how to achieved this ? I am trying to achieve similar to what you were trying to Grafana how to calculate - 5 min (metric_value before 5 min)