# Kubernetes cpu usage

**URL:** <https://discuss.elastic.co/t/kubernetes-cpu-usage/116411>\
**Category:** Kibana\
**Created:** [January 21, 2018, 11:12pm UTC](https://discuss.elastic.co/t/kubernetes-cpu-usage/116411 "2018-01-21T23:12:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kanthimathi](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@kanthimathi](https://discuss.elastic.co/u/kanthimathi)\
**Post date:** [January 21, 2018, 11:12pm UTC](https://discuss.elastic.co/t/kubernetes-cpu-usage/116411/1 "2018-01-21T23:12:30Z")

</div>

Hi all,

I would like to find the CPU usage for each service with time. For this purpose, i am using the visual builder feature. I don't want to find the average or sum, just want to visualize the service and the memory used. To be more clear get the data as such in log and view it using the visual builder feature.

I couldn't figure a way to just get the "kubernetes.container.memory.usage" and how to convert nanocore to percentage? Can anybody help?

Thanks,  
Kanthi.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [January 22, 2018, 7:44pm UTC](https://discuss.elastic.co/t/kubernetes-cpu-usage/116411/2 "2018-01-22T19:44:46Z")

</div>

What are you using to gather the data? If you are using Metricbeat to do it, you can set the interval in TSVB to the delay set between documents in the beat and this way the average will be of only one value.

---

<div class="post-metadata">

**Author:** ![kanthimathi](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@kanthimathi](https://discuss.elastic.co/u/kanthimathi)\
**Post date:** [January 22, 2018, 7:50pm UTC](https://discuss.elastic.co/t/kubernetes-cpu-usage/116411/3 "2018-01-22T19:50:02Z")

</div>

@Marius_Dragomir Yes, I am using metricbeats. Can you please guide me how to do that ? I checked in metricbeats-kubernetes.yaml but couldn't find.

 ![00 AM](https://us1.discourse-cdn.com/elastic/original/3X/3/4/349cd86712d4a4424b207284b3febe7ceabf66b7.png)

This is the visualization I am interested in and would like to change the nanocores to percentage and in aggregation, would like to not use sum or average instead get values as such.

Thanks.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [January 22, 2018, 9:06pm UTC](https://discuss.elastic.co/t/kubernetes-cpu-usage/116411/4 "2018-01-22T21:06:03Z")

</div>

Here is the documentation for the kubernetes module where you can find the period:  
[https://www.elastic.co/guide/en/beats/metricbeat/master/metricbeat-module-kubernetes.html](https://www.elastic.co/guide/en/beats/metricbeat/master/metricbeat-module-kubernetes.html)  
There is no way to use "values" in aggregation as that is not an option. The default period is 10s so if you keep the histogram interval like in the screenshot, you'll get an" average", "max" or "min" of only one document, which is exactly as showing values.  
As for converting nanocores to percentage mode, i don't think that will work in this case as it depends on what data Beats collects from Kubernetes. The safest bet is to ask in the Beats subforum here as I don't really have that much experience with Kubernetes.

---

<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:** [February 19, 2018, 9:06pm UTC](https://discuss.elastic.co/t/kubernetes-cpu-usage/116411/5 "2018-02-19T21:06:13Z")

</div>

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