# Can we modify the way Metricbeat Claculates the System metric fighures

**URL:** <https://discuss.elastic.co/t/can-we-modify-the-way-metricbeat-claculates-the-system-metric-fighures/130951>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [May 8, 2018, 7:52am UTC](https://discuss.elastic.co/t/can-we-modify-the-way-metricbeat-claculates-the-system-metric-fighures/130951 "2018-05-08T07:52:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunilmchaudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunilmchaudhari/32/9475_2.png) [@sunilmchaudhari](https://discuss.elastic.co/u/sunilmchaudhari)\
**Post date:** [May 8, 2018, 7:52am UTC](https://discuss.elastic.co/t/can-we-modify-the-way-metricbeat-claculates-the-system-metric-fighures/130951/1 "2018-05-08T07:52:31Z")

</div>

Hi,  
I have configured MB on linux machine to read system metric.  
However figures are different that the commands? When I say free -m on command line, t gives different figures than that of metricbeat.

How to validate output of metricbeat?  
What are the commands internally it uses?  
Can we modify those commands?

br,  
Sunil Chaudhari.

---

<div class="post-metadata">

**Author:** ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)\
**Post date:** [May 8, 2018, 8:52pm UTC](https://discuss.elastic.co/t/can-we-modify-the-way-metricbeat-claculates-the-system-metric-fighures/130951/2 "2018-05-08T20:52:40Z")

</div>

We are using a system call to [retrieve this information](https://github.com/elastic/beats/blob/fb84ad34cb13d118cf33b88c8727e8c0366b3097/vendor/github.com/elastic/gosigar/sigar_unix.go#L14-L29).

I think we send the bytes values to elasticsearch, and in your case `free -m` returns the values in [mebibytes](http://man7.org/linux/man-pages/man1/free.1.html)

How different are the numbers it is just a scale difference?

---

<div class="post-metadata">

**Author:** ![sunilmchaudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunilmchaudhari/32/9475_2.png) [@sunilmchaudhari](https://discuss.elastic.co/u/sunilmchaudhari)\
**Post date:** [May 9, 2018, 1:41am UTC](https://discuss.elastic.co/t/can-we-modify-the-way-metricbeat-claculates-the-system-metric-fighures/130951/3 "2018-05-09T01:41:09Z")

</div>

Hi Pier,  
Thanks for reply.

There is scale different problem as well as explained below.  
There are multiple hosts i have configured. In Combine line graph it shows one system to some Y1 level. See image 1  
And when I click on that hosts, it goes down to some lower level, which seems to be its original one. Why does it behave like this?  
See the host with green color.

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

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

---

<div class="post-metadata">

**Author:** ![sunilmchaudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunilmchaudhari/32/9475_2.png) [@sunilmchaudhari](https://discuss.elastic.co/u/sunilmchaudhari)\
**Post date:** [May 9, 2018, 2:11am UTC](https://discuss.elastic.co/t/can-we-modify-the-way-metricbeat-claculates-the-system-metric-fighures/130951/4 "2018-05-09T02:11:37Z")

</div>

Hi,  
About calculation difference, We need the figures as below for the memory:  
How we calculate free memory, is (free memory) + (buffer/cacche memory)  
How we calculate memory utilization is equal to List all the running services and add the total percentage usage of each service  
via (pidstat -rl)

How can we modify metricbeat to align to above calculations output.

br,  
Sunil.

---

<div class="post-metadata">

**Author:** ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)\
**Post date:** [May 10, 2018, 1:19pm UTC](https://discuss.elastic.co/t/can-we-modify-the-way-metricbeat-claculates-the-system-metric-fighures/130951/5 "2018-05-10T13:19:41Z")

</div>

Are theses the default dashboard that we ship with metricbeat?

---

<div class="post-metadata">

**Author:** ![sunilmchaudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunilmchaudhari/32/9475_2.png) [@sunilmchaudhari](https://discuss.elastic.co/u/sunilmchaudhari)\
**Post date:** [May 10, 2018, 1:32pm UTC](https://discuss.elastic.co/t/can-we-modify-the-way-metricbeat-claculates-the-system-metric-fighures/130951/6 "2018-05-10T13:32:09Z")

</div>

Yes. These are default dashboards and visualization too.

---

<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:** [June 7, 2018, 1:32pm UTC](https://discuss.elastic.co/t/can-we-modify-the-way-metricbeat-claculates-the-system-metric-fighures/130951/7 "2018-06-07T13:32:09Z")

</div>

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