# Access Log Filter

**URL:** <https://discuss.elastic.co/t/access-log-filter/109556>\
**Category:** Logstash\
**Created:** [November 29, 2017, 9:46am UTC](https://discuss.elastic.co/t/access-log-filter/109556 "2017-11-29T09:46:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![deepakkr407](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@deepakkr407](https://discuss.elastic.co/u/deepakkr407)\
**Post date:** [November 29, 2017, 9:46am UTC](https://discuss.elastic.co/t/access-log-filter/109556/1 "2017-11-29T09:46:23Z")

</div>

I am using following filter but this is not fetching response code and timetaken as column in elastic search. Any suggestions?

{ "message" =\> ["%{TIMESTAMP\_ISO8601:log\_timestamp} %{NOTSPACE:s-sitename} %{NOTSPACE:s-computername} %{IPORHOST:s-ip} %{WORD:cs-method} %{URIPATH:cs-uri-stem} %{NOTSPACE:cs-uri-query} %{NUMBER:s-port} %{NOTSPACE:cs-username} %{IPORHOST:c-ip} %{NOTSPACE:cs(User-Agent)} %{NUMBER:sc-status:int} %{NUMBER:sc-substatus:int} %{NUMBER:sc-win32-status:int} %{NUMBER:sc-bytes:int} %{NUMBER:cs-bytes:int} %{NUMBER:time-taken:int}","%{TIMESTAMP\_ISO8601:log\_timestamp} %{NOTSPACE:s-sitename} %{NOTSPACE:s-computername} %{IPORHOST:s-ip} %{WORD:cs-method} %{URIPATH:cs-uri-stem} %{NOTSPACE:cs-uri-query} %{NUMBER:s-port} %{NOTSPACE:cs-username} %{IPORHOST:c-ip} %{NOTSPACE:cs(User-Agent)} %{NUMBER:response:int} %{NUMBER:sc-substatus:int} %{NUMBER:time-taken:int}","%{TIMESTAMP\_ISO8601:log\_timestamp} %{WORD:cs-method} %{URIPATH:cs-uri-stem} %{NOTSPACE:cs-uri-query} %{NUMBER:s-port} %{IPORHOST:c-ip} %{NOTSPACE:cs(User-Agent)} %{NUMBER:sc-status:int} %{NUMBER:sc-substatus:int} %{NUMBER:sc-win32-status:int} %{NUMBER:sc-bytes:int} %{NUMBER:cs-bytes:int} %{NUMBER:time-taken:int}"] }

Logs Pattern

2017-11-04 04:10:49 ABC CDE 168.94.220.121 GET / - 443 - 1.1.1.1 QualysGuard 403 14 0 1461 106 7254

---

<div class="post-metadata">

**Author:** ![JKhondhu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JKhondhu](https://discuss.elastic.co/u/JKhondhu)\
**Post date:** [November 30, 2017, 11:40pm UTC](https://discuss.elastic.co/t/access-log-filter/109556/2 "2017-11-30T23:40:20Z")

</div>

Hi,  
Here is a link on grok basics: [https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html#\_grok\_basics2](https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html#_grok_basics2)

[http://grokdebug.herokuapp.com](http://grokdebug.herokuapp.com) and [http://grokconstructor.appspot.com/](http://grokconstructor.appspot.com/) are useful for helping building patterns to match your logs.

---

<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:** [December 28, 2017, 11:40pm UTC](https://discuss.elastic.co/t/access-log-filter/109556/3 "2017-12-28T23:40:52Z")

</div>

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