# Logstash bytes plugin behaving weirdly

**URL:** <https://discuss.elastic.co/t/logstash-bytes-plugin-behaving-weirdly/290947>\
**Category:** Logstash\
**Created:** [December 4, 2021, 9:39am UTC](https://discuss.elastic.co/t/logstash-bytes-plugin-behaving-weirdly/290947 "2021-12-04T09:39:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkauffmann](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@tkauffmann](https://discuss.elastic.co/u/tkauffmann)\
**Post date:** [December 4, 2021, 9:39am UTC](https://discuss.elastic.co/t/logstash-bytes-plugin-behaving-weirdly/290947/1 "2021-12-04T09:39:44Z")

</div>

Hi,

I am trying to use the "Bytes" plugin ([Bytes filter plugin | Logstash Reference [8.0] | Elastic](https://www.elastic.co/guide/en/logstash/8.0/plugins-filters-bytes.html)) to transform fields in the form "1 GB" to their bytes value.

I use the following syntax :

```auto
      bytes {
        source => "my_bytes_string_field"
        target => "my_bytes_numeric_field"
      }

```

The result (target) value is exact but I get a concatenated field in the form "1GB, 1073741824".  
This is NOT what I expect as a target value.  
What I expect is the raw value alone : "1073741824"

What am I doing wrong ?  
Kind regards,  
Thierry

---

<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:** [January 1, 2022, 9:40am UTC](https://discuss.elastic.co/t/logstash-bytes-plugin-behaving-weirdly/290947/2 "2022-01-01T09:40:09Z")

</div>

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