# Metricbeat 5.3.0 reporting strange memory value

**URL:** <https://discuss.elastic.co/t/metricbeat-5-3-0-reporting-strange-memory-value/124825>\
**Category:** Beats\
**Created:** [March 20, 2018, 4:50pm UTC](https://discuss.elastic.co/t/metricbeat-5-3-0-reporting-strange-memory-value/124825 "2018-03-20T16:50:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![michbsd](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@michbsd](https://discuss.elastic.co/u/michbsd)\
**Post date:** [March 20, 2018, 4:50pm UTC](https://discuss.elastic.co/t/metricbeat-5-3-0-reporting-strange-memory-value/124825/1 "2018-03-20T16:50:26Z")

</div>

beats 5.3.0 on FreeBSD

linprocfs has been mounted

and this has been working for months.

This morning I noticed errors in my elasticsearch log, something like this:

```
"[2018-03-20T15:53:19,197][DEBUG][o.e.a.b.TransportShardBulkAction] [7xHqegG] [metricbeat-2018.03.20][4] failed to execute bulk item (index) BulkShardRequest [[metricbeat-2018.03.20][4]] containing [3] requests
org.elasticsearch.index.mapper.MapperParsingException: failed to parse [system.memory.actual.used.bytes]"
[...]
Caused by: com.fasterxml.jackson.core.JsonParseException: Numeric value (18446744073594953728) out of range of long (-9223372036854775808 - 9223372036854775807)
 at [Source: org.elasticsearch.common.bytes.BytesReference$MarkSupportingStreamInputWrapper@36de2852; line: 1, column: 273]

```

I identified the offending beat host, sending this:

```
  "system": {
    "memory": {
      "actual": {
        "free": 137388007424,
        "used": {
          "bytes": 18446744073624211456,
          "pct": 134350952.106100
        }
      },
      "free": 137135058944,
      "swap": {
        "free": 2139643904,
        "total": 2147479552,
        "used": {
          "bytes": 7835648,
          "pct": 0.003600
        }
      },
      "total": 137302667264,
      "used": {
        "bytes": 167608320,
        "pct": 0.001200
      }
    }
  },
  "type": "metricsets"
}

```

**bytes": 18446744073624211456,** - that's a lot of used bytes.. 🙂

Here's the meminfo output:  
❯ cat /compat/linux/proc/meminfo [5:45:00 PM]  
total: used: free: shared: buffers: cached:  
Mem: 137302667264 167362560 137135304704 14020608 0 252948480  
Swap: 2147479552 7835648 2139643904  
MemTotal: 134084636 kB  
MemFree: 133921196 kB  
MemShared: 13692 kB  
Buffers: 0 kB  
Cached: 247020 kB  
SwapTotal: 2097148 kB  
SwapFree: 2089496 kB

I have update to gosigar 0.9.0

Any ideas?

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [March 26, 2018, 3:39pm UTC](https://discuss.elastic.co/t/metricbeat-5-3-0-reporting-strange-memory-value/124825/2 "2018-03-26T15:39:29Z")

</div>

Did you only update gosigar? What version were you using before?

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [March 26, 2018, 10:04pm UTC](https://discuss.elastic.co/t/metricbeat-5-3-0-reporting-strange-memory-value/124825/3 "2018-03-26T22:04:19Z")

</div>

I have created an issue in gosigar to investigate this ([https://github.com/elastic/gosigar/issues/102](https://github.com/elastic/gosigar/issues/102)). It seems that in some cases actual free memory is greater than total memory, and this is used to calculate used memory.

---

<div class="post-metadata">

**Author:** ![michbsd](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@michbsd](https://discuss.elastic.co/u/michbsd)\
**Post date:** [March 27, 2018, 8:33am UTC](https://discuss.elastic.co/t/metricbeat-5-3-0-reporting-strange-memory-value/124825/4 "2018-03-27T08:33:20Z")

</div>

☹ Not entirely sure. Whatever was released with 5.3.0 of beats..

I disabled memory metricset for a few days, and reenabled it again, and the error was gone.

In the meantime I have upgraded to beats 5.6.8 - and the error is gone. Very strange though.

---

<div class="post-metadata">

**Author:** ![michbsd](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@michbsd](https://discuss.elastic.co/u/michbsd)\
**Post date:** [March 27, 2018, 8:34am UTC](https://discuss.elastic.co/t/metricbeat-5-3-0-reporting-strange-memory-value/124825/5 "2018-03-27T08:34:28Z")

</div>

Great - will follow the bug analysis

---

<div class="post-metadata">

**Author:** ![michbsd](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@michbsd](https://discuss.elastic.co/u/michbsd)\
**Post date:** [March 28, 2018, 2:22pm UTC](https://discuss.elastic.co/t/metricbeat-5-3-0-reporting-strange-memory-value/124825/6 "2018-03-28T14:22:20Z")

</div>

Spoke to fast- I am now seeing this error from two different hosts running metricbeat 5.6.8

---

<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:** [April 25, 2018, 4:22pm UTC](https://discuss.elastic.co/t/metricbeat-5-3-0-reporting-strange-memory-value/124825/7 "2018-04-25T16:22:45Z")

</div>

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