# Provided Grok expressions do not match field value when apache2 response\_code is 304

**URL:** <https://discuss.elastic.co/t/provided-grok-expressions-do-not-match-field-value-when-apache2-response-code-is-304/81512>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 6, 2017, 4:43pm UTC](https://discuss.elastic.co/t/provided-grok-expressions-do-not-match-field-value-when-apache2-response-code-is-304/81512 "2017-04-06T16:43:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dulman](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@dulman](https://discuss.elastic.co/u/dulman)\
**Post date:** [April 6, 2017, 4:43pm UTC](https://discuss.elastic.co/t/provided-grok-expressions-do-not-match-field-value-when-apache2-response-code-is-304/81512/1 "2017-04-06T16:43:11Z")

</div>

Hello,

I'm using Filebeat 5.3.0 with the apache2 module. I'm getting grok expression errors.

Example:

When the following line appears in the access.log:

127.0.0.1 - ironman [06/Apr/2017:18:55:56 +0200] "GET /bundles/4b5a84aaf1c9485e060c503a0ff8cadb.woff2 HTTP/1.1" 200 2153 "[https://kibana-url.com:8081/bundles/commons.style.css?v=14823](https://kibana-url.com:8081/bundles/commons.style.css?v=14823)" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"

...all works fine, as of Kibana:

 ![image](https://cloud.githubusercontent.com/assets/20679842/24764898/245fa622-1af6-11e7-8c90-a62c97cd4996.png)

But when the following line appears in the access.log:

127.0.0.1 - hulk [06/Apr/2017:18:55:56 +0200] "GET /bundles/4b5a84aaf1c9485e060c503a0ff8cadb.woff2 HTTP/1.1" 304 - "[https://kibana-url.com:8081/bundles/commons.style.css?v=14823](https://kibana-url.com:8081/bundles/commons.style.css?v=14823)" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"

... I'm getting grok expression errors, as of Kibana:

 ![](https://us1.discourse-cdn.com/elastic/original/3X/6/5/657ee119032297aa4dbbf8936b600c6c9c5b5c55.png)

Because the response\_code is 304 and the body\_sent.bytes are not set (red bordered in my picture).

The grok patterns

... %{NUMBER:apache2.access.response\_code} %{NUMBER:apache2.access.body\_sent.bytes} ... are not matching.

- Version: 5.3.0
- Operating System: Amazon Linux (Cent OS 6)
- Steps to Reproduce: You can paste the lines from my examples into a file and configure filebeat apache2 module for it

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [April 7, 2017, 11:58am UTC](https://discuss.elastic.co/t/provided-grok-expressions-do-not-match-field-value-when-apache2-response-code-is-304/81512/2 "2017-04-07T11:58:36Z")

</div>

This sounds like the same issue fix here? [https://github.com/elastic/beats/pull/3863](https://github.com/elastic/beats/pull/3863) This should be fixed in the upcoming 5.3.1 release.

---

<div class="post-metadata">

**Author:** ![dulman](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@dulman](https://discuss.elastic.co/u/dulman)\
**Post date:** [April 19, 2017, 2:01pm UTC](https://discuss.elastic.co/t/provided-grok-expressions-do-not-match-field-value-when-apache2-response-code-is-304/81512/3 "2017-04-19T14:01:43Z")

</div>

ok, Thx! 🙂

---

<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 27, 2017, 4:43pm UTC](https://discuss.elastic.co/t/provided-grok-expressions-do-not-match-field-value-when-apache2-response-code-is-304/81512/4 "2017-04-27T16:43:11Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
