Grafan Integrated Metric Filter

Is it possible to filter values ​​from comlex metric in grafana? For instance:

SELECT sum(one) + sum(two) FROM "table" WHERE $timeFilter GROUP BY time($interval)

I need to show only a positive amount sum(one) + sum(two) > 0

In sql, I would use an alias and a sentence HAVINGlike:

SELECT sum(one) + sum(two) AS S FROM "table" WHERE $timeFilter GROUP BY time($interval) HAVING S > 0

However, this does not work in graphan. How can I achieve this result without creating a new sum column in the internal database?

version

[EDIT]: My GUI looks like this:

enter image description here After clicking the Pen button:

enter image description here

+4
source share
2 answers

, datasource grafana + infuxdb:

enter image description here

, > 0.

, . , , .

0

Source: https://habr.com/ru/post/1652175/


All Articles