0

I am trying to plot CPU usage in Grafana. Collectd gives metric to InfluxDB and I get metric from Influxdb into Grafana. I have tried taking derivative of last value but CPU is in negative. I want it to be in percentage.

I have cpu idle,interrupt,system,user. enter image description here

David B.
  • 466
  • 1
  • 3
  • 12
kinkajou
  • 143
  • 1
  • 16

1 Answers1

2

This is behaving as expected. Derivative will give you the change, not absolute value. So negative means your CPU usage went down. The idle, system, user stats are already in percent on unix, so you can display them directly, without usage of derivative.

If you want to display the average of the last x seconds, to smooth your graph out, use transform -> summarize, and chose avg as method of summarization.

mzhaase
  • 3,798
  • 2
  • 20
  • 32