How can I get CPU usage for multiple servers within a single panel?

Hi,

I’m relatively new to Grafana\Prometheus & I’m trying to build a server monitoring dashboard using the Boom Table Panel with the goal at this very early stage to have a row for each server selected, showing memory & CPU usage. When multiple servers are selected, memory usage works as expected & we get a row for each server, however CPU usage appears to be aggregated & this is also the case if we take the Boom Table out of the equation. I suspect that it’s something to do with the metric query I’m using, which works absolutely fine for a single server, but as soon as I add others, it provides a single aggregated number rather than the usage for each server.

The query I’m using is :

100-(avg(irate(windows_cpu_time_total{instance=~“$instance”,mode=“idle”}[2m])))*100

I’d really appreciate it if someone could point the error of my ways :slight_smile:

Thanks!

Hi,

If you want to show the all instance, please use this:


Then select the instance, so it’ll show the repeat of all instances…

Regards,
Fadjar

Hi Fadjar,

Thanks for replying!

That approach works fine for multiple panels, but I’m looking to have a single panel with a table showing all servers & their stats, so another column here showing CPU usage…

Like I say, I’m pretty sure that the query for CPU is taking an average across all servers & I’m trying to achieve something like this…

Thanks,

Neil

Hi…

I build this panel that suitable with my requirement

This panel just using Table with 3 transform, Merged, Group By and Organized Fields.
The Datasource using Prometheus

Regards,
Fadjar