# Newbie question: different numbers of URL parameters

**URL:** <https://discuss.elastic.co/t/newbie-question-different-numbers-of-url-parameters/77978>\
**Category:** Logstash\
**Created:** [March 9, 2017, 12:19pm UTC](https://discuss.elastic.co/t/newbie-question-different-numbers-of-url-parameters/77978 "2017-03-09T12:19:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andre22](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@andre22](https://discuss.elastic.co/u/andre22)\
**Post date:** [March 9, 2017, 12:19pm UTC](https://discuss.elastic.co/t/newbie-question-different-numbers-of-url-parameters/77978/1 "2017-03-09T12:19:54Z")

</div>

Hi,

I am new to to the ELK stack and managed to get the first data into elastic and perform some searches. Now I would like to work with some of my customized web server logs. Very probably this has been answered before, but as I am new the the whole topic I probably don't know the terms to find it - sorry if that's the case.

The logs have a structure which I put into a grok pattern:

\A%{TIMESTAMP\_ISO8601} %{IP} %{USERNAME} %{HOSTNAME} %{WORD} %{URIPATH} **%{NOTSPACE}** %{NUMBER} %{NOTSPACE} %{NOTSPACE} %{NOTSPACE} %{NOTSPACE} %{NOTSPACE} %{NOTSPACE} %{NOTSPACE} %{NOTSPACE} %{NOTSPACE}

Now the first %{NOTSPACE} contains at least one ore more URL parameters like  
?color=blue&number=56&weather=sunny

Would it be possible to have these extracted as separate fields whenever they occur? All of these parameters are name:value pairs, none of them is there all the time and the amount of them per log line can differ.

Thank you!

---

<div class="post-metadata">

**Author:** ![RodrigoMontoro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rodrigomontoro/32/16203_2.png) [@RodrigoMontoro](https://discuss.elastic.co/u/RodrigoMontoro)\
**Post date:** [March 9, 2017, 12:29pm UTC](https://discuss.elastic.co/t/newbie-question-different-numbers-of-url-parameters/77978/2 "2017-03-09T12:29:25Z")

</div>

Hi there!

You could save this in some field and them apply kv filter to split those parameters.

[https://www.elastic.co/guide/en/logstash/current/plugins-filters-kv.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-kv.html)

Hope it helps.

Regards

---

<div class="post-metadata">

**Author:** ![andre22](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@andre22](https://discuss.elastic.co/u/andre22)\
**Post date:** [March 10, 2017, 9:56am UTC](https://discuss.elastic.co/t/newbie-question-different-numbers-of-url-parameters/77978/3 "2017-03-10T09:56:34Z")

</div>

Thank you, this sounds helpful. Looks like I have to pass another barrier first, after I have got the grok filter working I will extend it with kv.

---

<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 7, 2017, 9:57am UTC](https://discuss.elastic.co/t/newbie-question-different-numbers-of-url-parameters/77978/4 "2017-04-07T09:57:01Z")

</div>

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