# Need assistance calculating CPU Busy from prometheus node exporter metric

**URL:** <https://discuss.elastic.co/t/need-assistance-calculating-cpu-busy-from-prometheus-node-exporter-metric/302910>\
**Category:** Kibana\
**Created:** [April 21, 2022, 12:50pm UTC](https://discuss.elastic.co/t/need-assistance-calculating-cpu-busy-from-prometheus-node-exporter-metric/302910 "2022-04-21T12:50:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marko\_Todoric](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marko_todoric/32/52975_2.png) [@Marko\_Todoric](https://discuss.elastic.co/u/Marko_Todoric)\
**Post date:** [April 21, 2022, 12:50pm UTC](https://discuss.elastic.co/t/need-assistance-calculating-cpu-busy-from-prometheus-node-exporter-metric/302910/1 "2022-04-21T12:50:51Z")

</div>

Hello team,

i currently have Grafana dashboard but considering that i try to learn ES as much as possible and have been using it for log aggregation for quite some time, i would like to switch to Kibana/ES to view metrics as well.  
I've successfully imported metrics from prometheus using remote\_write and elastic fleet agent, however I'm having trouble figuring out how to display CPU Busy time like in Grafana dashboard.

Below is a screenshot from Grafana providing the CPU Busy gauge.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/f/4f11c4dd89591d32f81cb3dfd2a305ed4e7a6d7a.png)

Metrics used to calculate this were previously imported, so was not put together by me:

```auto
(((count(count(node_cpu_seconds_total{instance="$node",job="$job"}) by (cpu))) - avg(sum by (mode)(irate(node_cpu_seconds_total{mode='idle',instance="$node",job="$job"}[5m])))) * 100) / count(count(node_cpu_seconds_total{instance="$node",job="$job"}) by (cpu))
```

Now I'm having trouble reflecting this to Kibana. I have fields `prometheus.node_cpu_seconds_total.counter` and `prometheus.node_cpu_seconds_total.rate` but have no idea how to use them to calculate.  
I'm on ES/Kibana versions 8.1.2, I'm guessing i have to use TSVB and/or some of the math/bucket script aggregations but, please don't bash on me - my math skills are extremely bad 😊

Any help is extremely welcome!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 19, 2022, 12:51pm UTC](https://discuss.elastic.co/t/need-assistance-calculating-cpu-busy-from-prometheus-node-exporter-metric/302910/2 "2022-05-19T12:51:13Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
