select SUM(value)
from /measurment1|measurment2/
where time > now() - 60m and host = 'hostname' limit 2;
Name: measurment1
time sum
---- ---
1505749307008583382 4680247
name: measurment2
time sum
---- ---
1505749307008583382 3004489
But is it possible to get value of SUM(measurment1+measurment2) , so that I see only o/p .
Not possible in influx query language. It does not support functions across measurements.
If this is something you require, you may be interested in layering another API on top of influx that do this, like Graphite via Influxgraph.
For the above, something like this.
/etc/graphite-api.yaml:
Start the graphite-api/influxgraph webapp.
A query
/render?from=-60min&target=sum(*.hostname.value)
then produces the sum ofvalue
on taghost='hostname'
for all measurements.{measurement1,measurement2}.hostname.value
can be used instead to limit it to specific measurements.NB - Performance wise (of influx), best to have multiple values in the same measurement rather than same value field name in multiple measurements.