# Grok data type isn't working a second time

**URL:** <https://discuss.elastic.co/t/grok-data-type-isnt-working-a-second-time/29000>\
**Category:** Logstash\
**Created:** [September 10, 2015, 9:13am UTC](https://discuss.elastic.co/t/grok-data-type-isnt-working-a-second-time/29000 "2015-09-10T09:13:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bjoern](https://avatars.discourse-cdn.com/v4/letter/b/46a35a/32.png) [@bjoern](https://discuss.elastic.co/u/bjoern)\
**Post date:** [September 10, 2015, 9:13am UTC](https://discuss.elastic.co/t/grok-data-type-isnt-working-a-second-time/29000/1 "2015-09-10T09:13:47Z")

</div>

Hello,

I got the following pattern:

```
SERVICE %{TIMESTAMP:time} - (%{A}|%{B})

A ServiceA - .* Length: %{INT:length:int}\; Time: %{INT:time:int}\;.*
B ServiceB - .* Length: %{INT:length:int}\; Time: %{INT:time:int}\;.*

```

The weird thing is that a message with ServiceA the length and time are marked as INT. A message from ServiceB length and time are strings. When I change the identifier from length in length\_b in the B pattern length\_b is an INT also.

Thanks

---

<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:** [July 6, 2017, 5:29am UTC](https://discuss.elastic.co/t/grok-data-type-isnt-working-a-second-time/29000/2 "2017-07-06T05:29:32Z")

</div>


