# Help with the grok filter on the custom application log

**URL:** <https://discuss.elastic.co/t/help-with-the-grok-filter-on-the-custom-application-log/161277>\
**Category:** Logstash\
**Created:** [December 18, 2018, 8:14am UTC](https://discuss.elastic.co/t/help-with-the-grok-filter-on-the-custom-application-log/161277 "2018-12-18T08:14:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![email2vimalraj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/email2vimalraj/32/38927_2.png) [@email2vimalraj](https://discuss.elastic.co/u/email2vimalraj)\
**Post date:** [December 18, 2018, 8:14am UTC](https://discuss.elastic.co/t/help-with-the-grok-filter-on-the-custom-application-log/161277/1 "2018-12-18T08:14:14Z")

</div>

Hi,

I'm getting logs like this:

```auto
2018-12-17 15:10:58,806 INFO AS="234_sample-app" REQ="1234" com.example.Event - COMP="my-sample-app" Status=200

```

Sometimes like this also:

```auto
2018-12-17 15:10:58,806 INFO AS="" REQ="" com.example.Event - COMP="my-sample-app"

```

If you notice, the fields `AS` and `REQ` are empty in the 2nd log and no `Status` field. I'm not sure on how to come up with grok filter for this kind of pattern. I've to make the `Status` field optional, but should be aggregated in Elastic Search.

---

<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:** [January 15, 2019, 8:19am UTC](https://discuss.elastic.co/t/help-with-the-grok-filter-on-the-custom-application-log/161277/2 "2019-01-15T08:19:36Z")

</div>

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