# Grok filter for custom logs

**URL:** <https://discuss.elastic.co/t/grok-filter-for-custom-logs/124918>\
**Category:** Logstash\
**Created:** [March 21, 2018, 7:20am UTC](https://discuss.elastic.co/t/grok-filter-for-custom-logs/124918 "2018-03-21T07:20:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mamta](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@mamta](https://discuss.elastic.co/u/mamta)\
**Post date:** [March 21, 2018, 7:20am UTC](https://discuss.elastic.co/t/grok-filter-for-custom-logs/124918/1 "2018-03-21T07:20:35Z")

</div>

Hello All,  
I have used grok filter to structured my logs.But I am not able to get an output as expected.Can anyone please help me to filter this logs?  
Thank you so much in advance....  
My logs input is as following

brk\_id:1|brk\_val:ABC  
brk\_id:100|brk\_val:QAZ  
brk\_id:100|brk\_val:QAZ  
brk\_id:101|brk\_val:water

My grok pattern is  
%{NUMBER:brk\_id}|%{WORD:brk\_val}

My grok filter output is  
{  
"brk\_id": [  
[  
"1"  
]  
],  
"BASE10NUM": [  
[  
"1"  
]  
],  
"brk\_val": [  
[  
"brk\_val"  
]  
]  
}

---

<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:** [April 18, 2018, 7:20am UTC](https://discuss.elastic.co/t/grok-filter-for-custom-logs/124918/2 "2018-04-18T07:20:41Z")

</div>

Closed on April 18, 2018, 7:20am UTC

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