# Filebeat input number fields are recognized as text fields in elastic/kibana

**URL:** <https://discuss.elastic.co/t/filebeat-input-number-fields-are-recognized-as-text-fields-in-elastic-kibana/298717>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 3, 2022, 9:20am UTC](https://discuss.elastic.co/t/filebeat-input-number-fields-are-recognized-as-text-fields-in-elastic-kibana/298717 "2022-03-03T09:20:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rick\_Barendse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rick_barendse/32/99235_2.png) [@Rick\_Barendse](https://discuss.elastic.co/u/Rick_Barendse)\
**Post date:** [March 3, 2022, 9:20am UTC](https://discuss.elastic.co/t/filebeat-input-number-fields-are-recognized-as-text-fields-in-elastic-kibana/298717/1 "2022-03-03T09:20:28Z")

</div>

I am a newbee to elastic

I am not able to solve ollowing issue:  
I try to load a json file with 2 number fields via filebeat in Elasticsearch. When looking into kibana discovery I see the fields with values but the values are recognized as text in stead of numbers.

I have created the next filebeat.inputs into the filebeat.yml:

```auto
- type: log
  enabled: true
  paths:
  - /var/log/test/*.json
  multiline.pattern: '^{'
  multiline.negate: true
  multiline.match: after
  processors:
  - decode_json_fields:
      fields: ["message"]
      target: "json"

```

The output goes to Elasticsearch:

```auto
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["localhost:9200"]

```

The next json file is created in the /var/log/test directory:

```auto
[
        {
                "NrOfBytes": 1670,
                "NrOfFailures": 5
        }
]

```

In the discovery panel of kibana the message field is loaded with the same data, which is OK:

```auto
[
        {
                "NrOfBytes": 1670,
                "NrOfFailures": 5
        }
]

```

But the "NrOfBytes" and "NrOfFailures" fields are loaded in text format (with a [t] in front of it in stead of a [#]):

[t] json.NrOfBytes 1670  
[t] json.NrOfFailures 5

![Schermafbeelding 2022-03-03 om 10.14.51](https://us1.discourse-cdn.com/elastic/original/3X/0/c/0cbcc2e78d5f7401d467d706feb5e8e9e8f13166.png)

I expect a number format for those fields.  
[#] json.NrOfBytes 1670  
[#] json.NrOfFailures 5

Because they are not recognized as numbers I am not able to create a line graph of those json input files.

Do I have to use the Logstash module for this or does anyone have another solution for me?

Many thanks in advance.

RickB

---

<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:** [March 31, 2022, 11:20am UTC](https://discuss.elastic.co/t/filebeat-input-number-fields-are-recognized-as-text-fields-in-elastic-kibana/298717/2 "2022-03-31T11:20:44Z")

</div>

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