# Grok Type Conversion Not Working (logstash-6.6.0)

**URL:** <https://discuss.elastic.co/t/grok-type-conversion-not-working-logstash-6-6-0/169330>\
**Category:** Logstash\
**Created:** [February 21, 2019, 5:43am UTC](https://discuss.elastic.co/t/grok-type-conversion-not-working-logstash-6-6-0/169330 "2019-02-21T05:43:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hitesh\_Khatri](https://avatars.discourse-cdn.com/v4/letter/h/71c47a/32.png) [@Hitesh\_Khatri](https://discuss.elastic.co/u/Hitesh_Khatri)\
**Post date:** [February 21, 2019, 5:43am UTC](https://discuss.elastic.co/t/grok-type-conversion-not-working-logstash-6-6-0/169330/1 "2019-02-21T05:43:05Z")

</div>

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

I have defined type conversion for id field to long in my grok pattern, still result is showing string. What am I doing wrong here? Please help.

```
Input: 127.0.0.1 [http-bio-8080-exec-33091] INFO 3747742999301509130

Pattern: %{IPV4:clientip} %{DATA:data} INFO %{BASE10NUM:id:long}

Output:
{
  "data": "[http-bio-8080-exec-33091]",
  "clientip": "127.0.0.1",
  "id": "3747742999301509130"
}

```

**logstash-6.6.0**

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 21, 2019, 1:39pm UTC](https://discuss.elastic.co/t/grok-type-conversion-not-working-logstash-6-6-0/169330/2 "2019-02-21T13:39:33Z")

</div>

Currently the only supported conversions are `int` and `float` .

---

<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 21, 2019, 1:39pm UTC](https://discuss.elastic.co/t/grok-type-conversion-not-working-logstash-6-6-0/169330/3 "2019-03-21T13:39:38Z")

</div>

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