Graphing CPU Usage % on Grafana using influxDB data from Telegraf

Drew picture Drew · Jun 4, 2016 · Viewed 26.6k times · Source

I have grafana 3.0.4 / influxdb 0.13.0 / telegraf 0.13.1

I am trying to graph overall CPU usage by %.

When I create a query using the idle time, I get exactly that (I'm looking for 100 - idle time) (usage)

idleusage

I switched to manual mode and did exactly that:

100-idletime

and it works great..

But is there a way to use a math function or something in the normal editor versus dropping into the manual text mode?

Answer

Gunnar picture Gunnar · Jun 6, 2016

Some slightly convoluted math using Grafana's Math field setting should do what you want without dropping into manual text mode.

Math(* -1 + 100)

enter image description here