Calculating and plotting KPIs with grafana


I´m a very beginner and want to use measurement data of different hosts to calculate and plot simple KPIswith grafana.

For example, the monitored power consumption of Host1 should be divided by the monitored power consumption of Host 2.

Is that possible with grafana using the GRAPH-Panel?

THX a lot!


Surely possible, but depends on what data source you decide to use in Grafana, i.e. the data source where you’ll store the monitored power consumption. If you use graphite or prometheus as data source to name a few it’s easy to divide one measurement with another since that supported in the query language of the time series databases. With other time series databases it can be tricky. to do query wise and you may need to do these kind of calculations before writing them to the database.



I’m using datasource Elasticsearch, and I need to calculate KPIs also (for example dividing one measurement with another). I can’t do this calculation before writing to the database. So, is it any solution to do this for Elasticsearch datasource and Graph panel?

Thanks a lot

Please try the MetaQueries datasource plugin.