# How to extract the end point and parameters from logs?

**URL:** <https://discuss.elastic.co/t/how-to-extract-the-end-point-and-parameters-from-logs/166716>\
**Category:** Logstash\
**Created:** [February 1, 2019, 11:00am UTC](https://discuss.elastic.co/t/how-to-extract-the-end-point-and-parameters-from-logs/166716 "2019-02-01T11:00:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinit\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinit_kumar/32/74784_2.png) [@Vinit\_Kumar](https://discuss.elastic.co/u/Vinit_Kumar)\
**Post date:** [February 1, 2019, 11:00am UTC](https://discuss.elastic.co/t/how-to-extract-the-end-point-and-parameters-from-logs/166716/1 "2019-02-01T11:00:50Z")

</div>

Hi All,

Just now I install elastic stack 6.6.0 and trying to write grok everything seems good. But I need to extract more data from the log like:

```
10.121.123.104 - - [01/Nov/2012:21:01:04 +0100] "GET /cluster HTTP/1.1" 200 1272
10.121.123.104 - - [01/Nov/2012:21:01:17 +0100] "GET /cpc/auth.do?loginsetup=true&targetPage=%2Fcpc%2F HTTP/1.1" 302 466
10.121.123.104 - - [01/Nov/2012:21:01:18 +0100] "GET /cpc?loginsetup=true&targetPage=%252Fcpc%252F HTTP/1.1" 302 -
10.121.123.104 - - [01/Nov/2012:21:01:18 +0100] "GET /cpc/auth.do?loginsetup=true&targetPage=%25252Fcpc%25252F&loginsetup=true HTTP/1.1" 302 494

```

How to extract  
if log is

```
10.121.123.104 - - [01/Nov/2012:21:01:17 +0100] "GET /cpc/auth.do?loginsetup=true&targetPage=%2Fcpc%2F HTTP/1.1" 302 466

```

then  
END\_POINT is `/cpc/auth.do`  
QUERY\_APARM is `loginsetup=true&targetPage=%2Fcpc%2F HTTP/1.1" 302 466`

if log is  
`10.121.123.104 - - [01/Nov/2012:21:01:04 +0100] "GET /cluster HTTP/1.1" 200 1272`  
then  
END\_POINT is `/cluster`  
END\_POINT is `-`

Can anybody have any idea how to do this?  
Thanks in Advance.

---

<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:** [March 1, 2019, 11:00am UTC](https://discuss.elastic.co/t/how-to-extract-the-end-point-and-parameters-from-logs/166716/2 "2019-03-01T11:00:51Z")

</div>

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