Incorrect "system.memory.actual.free" metrics

It seems that the system.memory.actual.free metric collected from Metricbeat is incorrect.

According to the document:

system.memory.actual.free

Actual free memory in bytes. It is calculated based on the OS. On Linux it consists of the free memory plus caches and buffers. On OSX it is a sum of free memory and the inactive memory. On Windows, it is equal to system.memory.free.

However, the actual collected free memory (collected by Metricbeat) does not include the caches and buffers. It does not align with the metrics I collected from free -m in the system.

Metricbeat

system.memory.actual.free: 3.8 GiB
system.memory.actual.used.bytes: 25.7 GiB

System

$ free -mh
              total        used        free      shared  buff/cache   available
Mem:            29G        3.9G        2.1G        289M         23G         24G

According to the system, the system.memory.actual.free should be 24GiB instead of 3.8GiB.

Would it be a misconfiguration or a bug?

The metricbeat is installed on:

Linux version 3.10.0-514.16.1.el7.x86_64 (mockbuild@x86-039.build.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Fri Mar 10 13:12:32 EST 2017

Thank you for any help!

Which version of metricbeat are you using? I reminded me off https://github.com/elastic/beats/issues/2653 but you are on Linux. I remember we did some changes in the past on this. @andrewkroh knows perhaps more?

This seems to be the same as Metricbeat system.memory.actual.free - is it accurate?, where Metricbeat does not use the MemAvailable value from the kernel.

@tim_wong Can you please open a new issue for this in the Github repo so we can track this.

FYI @simonl

Great stuff, I'll be able to dump my Nagios mem checker :wink:

Thanks! I saw that an issue has been opened: https://github.com/elastic/beats/issues/4202

Can't wait for its release! :yum:

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