# How to create a visualization for node cpu usage of kubernetes

**URL:** https://discuss.elastic.co/t/how-to-create-a-visualization-for-node-cpu-usage-of-kubernetes/285356
**Category:** Kibana
**Created:** [September 28, 2021, 12:40pm UTC](https://discuss.elastic.co/t/how-to-create-a-visualization-for-node-cpu-usage-of-kubernetes/285356 "2021-09-28T12:40:09Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Kaushik\_R](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaushik_r/32/95177_2.png) [@Kaushik\_R](https://discuss.elastic.co/u/Kaushik_R)
#### Post date: [September 28, 2021, 12:40pm UTC](https://discuss.elastic.co/t/how-to-create-a-visualization-for-node-cpu-usage-of-kubernetes/285356/1 "2021-09-28T12:40:09Z")

</div>

Hi All,

I'm trying to create a visualization to capture the node cpu usage of a kubernetes node.

i'm trying to use kubernetes.node.cpu.usage.nanocores , kubernetes.node.cpu.usage.nanocores but none is working the outcome is 0

The aggregation that I tried using is average ,max and even unique count .

We are not using metricbeat module here but filebeat is configured.

Can anyone please help me how to achieve this ?

---

<div class="post-metadata">

### Author: ![devon.thomson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devon.thomson/32/85468_2.png) [@devon.thomson](https://discuss.elastic.co/u/devon.thomson)
#### Post date: [September 28, 2021, 2:12pm UTC](https://discuss.elastic.co/t/how-to-create-a-visualization-for-node-cpu-usage-of-kubernetes/285356/2 "2021-09-28T14:12:52Z")

</div>

I'm not sure, but it seems to me like there isn't any relevant data in your current view. The first step I would take is to [set the time range](https://www.elastic.co/guide/en/kibana/current/set-time-filter.html) to a range where you're sure there will be data.

If nothing shows up, I would look next in [Discover](https://www.elastic.co/guide/en/kibana/current/discover.html) to see if you can find any records at all, and if so, check if the field `kubernetes.node.cpu.usage.nanocores` exists in the records that are there. You can add a filter for that by selecting the field, and the operator `exists`.

If the data isn't there at all, it must be an ingestion problem, and I will forward you to the appropriate team!

---

<div class="post-metadata">

### Author: ![Kaushik\_R](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaushik_r/32/95177_2.png) [@Kaushik\_R](https://discuss.elastic.co/u/Kaushik_R)
#### Post date: [September 28, 2021, 3:13pm UTC](https://discuss.elastic.co/t/how-to-create-a-visualization-for-node-cpu-usage-of-kubernetes/285356/3 "2021-09-28T15:13:13Z")

</div>

Hi Devon,

Thanks for the reply .

I do see the data show up but as soon as I add another metric related to nodeGroup or node.label in order to group based on the nodes the data vanishes.

---

<div class="post-metadata">

### Author: ![devon.thomson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devon.thomson/32/85468_2.png) [@devon.thomson](https://discuss.elastic.co/u/devon.thomson)
#### Post date: [September 28, 2021, 3:29pm UTC](https://discuss.elastic.co/t/how-to-create-a-visualization-for-node-cpu-usage-of-kubernetes/285356/4 "2021-09-28T15:29:38Z")

</div>

You should check again in Discover and make sure there are records where `nodeGroup` or `node.label` exists, as well as `kubernetes.node.cpu.usage.nanocores` existing.

Are you using Visualize or Lens to create your visualization?

---

<div class="post-metadata">

### Author: ![ghudgins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ghudgins/32/138532_2.png) [@ghudgins](https://discuss.elastic.co/u/ghudgins)
#### Post date: [September 29, 2021, 8:40pm UTC](https://discuss.elastic.co/t/how-to-create-a-visualization-for-node-cpu-usage-of-kubernetes/285356/5 "2021-09-29T20:40:56Z")

</div>

> [@Kaushik\_R](#):
>
> We are not using metricbeat module here but filebeat is configured.

I don't think that field is included in filebeat so if you aren't feeding metric data that could be it.

...but this field is in metricbeat. I would double check your data in Discover like @devon.thomson was mentioning using an "exists" filter for the nanocores field and expand a single document from that dataset to get a sense for what's there. I don't see this `nodeGroup` or `node.label` as part of the `event.dataset` for "kubernetes.node" data on my example environment...here's what I see:

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

...but i'm able to build a visualization with the fields that are there:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/2/62d3d222a6d98e0c1d0053af6e9dc15ab60b3069.png)

---

<div class="post-metadata">

### Author: ![Kaushik\_R](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaushik_r/32/95177_2.png) [@Kaushik\_R](https://discuss.elastic.co/u/Kaushik_R)
#### Post date: [September 30, 2021, 8:59am UTC](https://discuss.elastic.co/t/how-to-create-a-visualization-for-node-cpu-usage-of-kubernetes/285356/6 "2021-09-30T08:59:49Z")

</div>

Hi @devon.thomson and @ghudgins ,

Thanks for your support.

You both were right the metric is part of the metricbeat module my bad and in my case i was not able to see the data show up in the discover section.

Index : mon-metrics-k8s-\*  
Metric : kubernetes.node.cpu.usage.nanocores  
Another Metric : kubernetes.node.labels.occloud\_oracle\_com/nodeGroup ( using this to group the value from spilt series option )

So this is the reason it's not coming up in visualization as well.

will you guys let me know what is the reason for data not coming up and Do i need to use some other index ?

---

<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: [October 28, 2021, 9:00am UTC](https://discuss.elastic.co/t/how-to-create-a-visualization-for-node-cpu-usage-of-kubernetes/285356/7 "2021-10-28T09:00:18Z")

</div>

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