InfluxDB v0.12 supports the following operations:
Arithmetic operation on the result of the aggregation function:
SELECT 10* MEAN(usage_system) AS avg FROM cpu WHERE time > now() - 10s;
or arithmetic operation between fields:
SELECT usage_system + usage_user AS avg FROM cpu WHERE time > now() - 10s;
and, most importantly, you can perform an arithmetic operation between the results of the aggregation function:
SELECT MEAN(usage_system) + MEAN(usage_user) AS avg FROM cpu WHERE time > now() - 10s GROUP BY host;
not supported by the Grafana graphics editor (but you can record it manually).
source share