# Help to grok

**URL:** <https://discuss.elastic.co/t/help-to-grok/147189>\
**Category:** Logstash\
**Created:** [September 4, 2018, 10:35am UTC](https://discuss.elastic.co/t/help-to-grok/147189 "2018-09-04T10:35:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sreejiths](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@sreejiths](https://discuss.elastic.co/u/sreejiths)\
**Post date:** [September 4, 2018, 10:35am UTC](https://discuss.elastic.co/t/help-to-grok/147189/1 "2018-09-04T10:35:19Z")

</div>

Below is the Input log to the logstash ..How to parse this ..How to ignore spaces & special character ":" ..Can anyone provide some tips please ..

Log  
Name: n01firewall\_fw01-vsx,Security Policy: fw01-active-14MAR2018,Connections number: 0,Connections peak: 228,Connections limit: 14900,Accelerator Status : on

Requirement  
"Name" : "n01firewall\_fw01-vsx"  
"Security Policy" : "fw01-active-14MAR2018"  
"Connections number" : 0  
"Connections peak" : 228  
"Connections limit : 14900

---

<div class="post-metadata">

**Author:** ![sreejiths](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@sreejiths](https://discuss.elastic.co/u/sreejiths)\
**Post date:** [September 5, 2018, 3:10am UTC](https://discuss.elastic.co/t/help-to-grok/147189/2 "2018-09-05T03:10:03Z")

</div>

Fixed .

Name:\s\*%{DATA:hostname},Security Policy:\s\*%{DATA:Policy},Connections number:\s\*%{INT:connection\_count},Connections peak:\s\*%{INT:connection\_peak},Connections limit:\s\*%{INT:connection\_limit},Accelerator Status :\s\*%{WORD:accleration\_status},Accept Templates :\s\*%{DATA:accept\_template},Cluster Status:\s\*%{WORD:cluster\_status}

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 5, 2018, 7:07pm UTC](https://discuss.elastic.co/t/help-to-grok/147189/3 "2018-09-05T19:07:18Z")

</div>

Don't use a grok filter for this, and especially not with repeated inefficient DATA patterns. Just use a kv filter.

---

<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:** [October 3, 2018, 7:07pm UTC](https://discuss.elastic.co/t/help-to-grok/147189/4 "2018-10-03T19:07:18Z")

</div>

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