Griesbacher / histou

Adds templates to Grafana in combination with nagflux
GNU General Public License v2.0
35 stars 16 forks source link

Math Expression in the Grafana query #30

Open cyb0 opened 5 years ago

cyb0 commented 5 years ago

Hello,

Is there an easy way to add a math expression to the select query in the template? I cannot find such a function in the code.

For example here is one of my InfluxDB queries from Grafana:

SELECT mean("value") *8 AS "Download Rate" FROM "metrics" WHERE ("host" = 'default-host' AND "service" = 'bandwidth AND "command" = 'check_bandwidth AND "performanceLabel" = 'iso.3.6.1.2.1.31.1.1.1.6.4') AND $timeFilter GROUP BY time($__interval) fill(null)

How to express that value multiplication "*8" in the above query in the template?

Thank you!

Regards, cyb0x

dan-m-joh commented 4 years ago

Hello cyb0,

Did you ever figure this out? I have asked my the same question...

Regards, D/\N