CPU utilization per core with windows-exporter

  • What Grafana version and what operating system are you using?
    Grafana: 9.5.2, OS: Windows 10

  • What are you trying to achieve?
    I’m trying to monitor Windows with windows-exporter. Most things work, I just can’t get CPU monitoring to work for each core. I want information about CPU0, CPU1, CPU2 etc to be displayed on the dashboard. I have 24 cores and I want each one to be shown.

  • How are you trying to achieve it?
    avg by (core) (irate(windows_cpu_time_total{instance=“$Instance”}[2m]))
    I also used sum by.
    Third option:
    100 - avg by (core) (irate(windows_cpu_time_total{mode=“idle”}[2m]))*100

  • What happened?
    It doesn’t match the results from Resource Monitor. I’m a newbie and I don’t quite get it yet (meaning promQL and grafana queries). After using “sum” and adding all the cores together, CPU usage is higher than it shows in Task Manager, and after using “avg” - lower.
    The third option looks the best but I’m not sure it’s correct. Any suggestions?

  • What did you expect to happen?
    To show e.g.: CPU 1 - 10% usage, cpu 20 - 2% etc.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    No, nothing

  • Did you follow any online instructions? If so, what is the URL?