# Scripting fields in kibana-how to do it

**URL:** <https://discuss.elastic.co/t/scripting-fields-in-kibana-how-to-do-it/144747>\
**Category:** Kibana\
**Created:** [August 16, 2018, 3:44pm UTC](https://discuss.elastic.co/t/scripting-fields-in-kibana-how-to-do-it/144747 "2018-08-16T15:44:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![habi](https://avatars.discourse-cdn.com/v4/letter/h/bbe5ce/32.png) [@habi](https://discuss.elastic.co/u/habi)\
**Post date:** [August 16, 2018, 3:44pm UTC](https://discuss.elastic.co/t/scripting-fields-in-kibana-how-to-do-it/144747/1 "2018-08-16T15:44:53Z")

</div>

Hey guys, i am trying to parse out one particular field from the message log, and include it in the index fields, i am relatively new to the kibana and confused between using the scripting fields or grok filters.  
here is my log example : `path:/xxxx/log/nginx.log type:xxxx @timestamp: @version:1 host:xxxx message: x.x.x.x x.x.x.x - - [11/Aug/2018:11:11:11 +0000] "GET /xxxxxxxxx HTTP/1.0" 200 35`  
i wanna parse out the http response code 200 and include it in the index pattern fields. Any help would be greatly appreciated. Thanks

---

<div class="post-metadata">

**Author:** ![Sjaak01](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Sjaak01](https://discuss.elastic.co/u/Sjaak01)\
**Post date:** [August 17, 2018, 12:56am UTC](https://discuss.elastic.co/t/scripting-fields-in-kibana-how-to-do-it/144747/2 "2018-08-17T00:56:18Z")

</div>

You need to use Logstash and a filter (such as Grok) to do this. Once you used Logstash to create the fields and values you want (e.g. http\_code:200) you can use Kibana to create some graphs.

In case of NGINX I think there are pre-made templates available for Grok that will do all the work for you.

---

<div class="post-metadata">

**Author:** ![habi](https://avatars.discourse-cdn.com/v4/letter/h/bbe5ce/32.png) [@habi](https://discuss.elastic.co/u/habi)\
**Post date:** [August 17, 2018, 2:47pm UTC](https://discuss.elastic.co/t/scripting-fields-in-kibana-how-to-do-it/144747/3 "2018-08-17T14:47:16Z")

</div>

do i need to give the number of the place where the http response is present, like here the message is already a field and i need to parse out a value inside the message field ,so do i need to give the place where the http response code is present or something like that

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 17, 2018, 3:07pm UTC](https://discuss.elastic.co/t/scripting-fields-in-kibana-how-to-do-it/144747/4 "2018-08-17T15:07:08Z")

</div>

Have a look at [this blog post](https://www.elastic.co/blog/a-practical-introduction-to-logstash) which describes how to work with Logstash.

---

<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:** [September 14, 2018, 3:18pm UTC](https://discuss.elastic.co/t/scripting-fields-in-kibana-how-to-do-it/144747/5 "2018-09-14T15:18:27Z")

</div>

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