# Need help with trimming trail spaces

**URL:** <https://discuss.elastic.co/t/need-help-with-trimming-trail-spaces/149480>\
**Category:** Elasticsearch\
**Created:** [September 21, 2018, 3:10pm UTC](https://discuss.elastic.co/t/need-help-with-trimming-trail-spaces/149480 "2018-09-21T15:10:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiran1](https://avatars.discourse-cdn.com/v4/letter/k/b5a626/32.png) [@kiran1](https://discuss.elastic.co/u/kiran1)\
**Post date:** [September 21, 2018, 3:10pm UTC](https://discuss.elastic.co/t/need-help-with-trimming-trail-spaces/149480/1 "2018-09-21T15:10:18Z")

</div>

Hi All, i have the following log pattern  
[20/Sep/2018:16:20:49 -0400] 00.000.000.000 "GET /XXXXX-XXXXX-XXXX/health HTTP/1.1" 200 (1 ms) 0  
I am using the following grok pattern  
@parse  
@type grok  
  
[%{DATA:time}] %{IPV4:ipAddress} %{GREEDYDATA:syslog\_message}"%{SPACE}%{GREEDYDATA:httpStatus:integer}(  
  
  
But I am left with a trailing space for http status

"httpStatus": [  
[  
"200 "  
]  
]

Can someone please help

---

<div class="post-metadata">

**Author:** ![jakelandis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jakelandis/32/36163_2.png) [@jakelandis](https://discuss.elastic.co/u/jakelandis)\
**Post date:** [September 21, 2018, 4:09pm UTC](https://discuss.elastic.co/t/need-help-with-trimming-trail-spaces/149480/2 "2018-09-21T16:09:05Z")

</div>

I think the pattern question got a bit mangled due to the formatting. Can you update the formatting so that grok pattern and/or input is rendered correctly ?

Also is this Logstash grok, or Ingest node grok ?

---

<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 19, 2018, 4:22pm UTC](https://discuss.elastic.co/t/need-help-with-trimming-trail-spaces/149480/3 "2018-10-19T16:22:51Z")

</div>

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