I am displaying my data in grafana using elasticseach as a datasource and using a plugin there called metaqueries to help do a calculation on elasticsearch's field like:
A: queryA
B: queryB
C: queryC
D: (A+B) / C
I am able to display the data correctly on a graph, but unfortunately this plugin does not support setting an alert so I am looking for an alternative way.
What I am thinking of is to calculate the fields in elasticsearch from multiple different queries and add that calculated field into a new index, I thought of using a job that runs a program which queries from elasticsearch, calculate the field and add it back into a new index which I will then use in grafana to display in a graph.
Is there any way I can do this calculation in kibana instead?
welcome to the Kibana community.
In Kibana there's the Lens editor which, since version 7.14, provides a new feature called "Formula" which enables math on field aggregations: Lens | Kibana Guide [7.14] | Elastic
Of course this depends on the type of queries you are currently using. Do you have more information about that?
Hi Marco, thanks for the reply,
It looks good however I am unsure if this actually creates the data in a new index to be use somewhere (Grafana) else or is this aggregated view only available in kibana's dashboard.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.