Is it possible to use another field in option calculation

I’ve got metricbeat diskio time values from elasticsearch and would like to calculate and graph avg. IO service time values rather than sampled total service time values per sampled period (system.diskio.{read|write}.time), ie. divide by number of IO requests per sample period found in another field (system.diskio.{read|write}.count).

Thought that it might be possible to make such calculation in a script… but forgot howto reference another ES field in a script…

Hi,

Please refer to solution here Grafana, Elasticsearch datasource and option script

Please let me know if that works

Marcus

That was the syntax, right thanks for remembering me again. It worked as such for referring another field, only that don’t solve my objective. For this I’ll need to divide the derivative with another derivative field. Would this somehow be possible?