# Split header param and convert the value to a number

**URL:** https://discuss.elastic.co/t/split-header-param-and-convert-the-value-to-a-number/205421
**Category:** Logstash
**Created:** [October 28, 2019, 8:38am UTC](https://discuss.elastic.co/t/split-header-param-and-convert-the-value-to-a-number/205421 "2019-10-28T08:38:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![anuradhamudalige](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@anuradhamudalige](https://discuss.elastic.co/u/anuradhamudalige)
#### Post date: [October 28, 2019, 8:38am UTC](https://discuss.elastic.co/t/split-header-param-and-convert-the-value-to-a-number/205421/1 "2019-10-28T08:38:44Z")

</div>

grok {  
match =\> {  
"message" =\> "^%{TIMESTAMP\_ISO8601:timestamp} %{LOGLEVEL:loglevel}%{SPACE}%{NOTSPACE:class}%{SPACE}(%{DATA:thread})%{SPACE}%{DATA:linenumber}%{DATA:txnid}%{NUMBER:eventID}%{DATA:eventName}%{DATA:componentid}%{IP:clientip}%{DATA:is\_key\_value}%{DATA:log\_msg}$"  
}  
}

I have this filter, and here I have linenumber field as "LINE:234", I want to take only the value and make it a number and proceed. Hence the output would be just 234 as in Number type.

How can I achieve this?

---

<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: [October 28, 2019, 12:30pm UTC](https://discuss.elastic.co/t/split-header-param-and-convert-the-value-to-a-number/205421/2 "2019-10-28T12:30:35Z")

</div>

I would replace %{DATA:linenumber} with LINE:%{NUMBER:linenumber:int}

---

<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: [November 25, 2019, 12:30pm UTC](https://discuss.elastic.co/t/split-header-param-and-convert-the-value-to-a-number/205421/3 "2019-11-25T12:30:37Z")

</div>

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