# Couldn't extract filename from "source" field

**URL:** https://discuss.elastic.co/t/couldnt-extract-filename-from-source-field/47218
**Category:** Logstash
**Created:** [April 13, 2016, 8:50am UTC](https://discuss.elastic.co/t/couldnt-extract-filename-from-source-field/47218 "2016-04-13T08:50:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rajkamalkool6](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@rajkamalkool6](https://discuss.elastic.co/u/rajkamalkool6)
#### Post date: [April 13, 2016, 8:50am UTC](https://discuss.elastic.co/t/couldnt-extract-filename-from-source-field/47218/1 "2016-04-13T08:50:53Z")

</div>

Hi,

I am using `Logstash 2.3.0` were I am using grok match to extract the filename from `source` field which was generated by default.

I am using below configuration to extract the filename but I am not getting the field `lognamereq` ,

```
     grok {
		   match => { "source" => "%{PATH}/%{UUID:lognamereq}" }
	}

```

Am I missing anything?

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [April 15, 2016, 6:02am UTC](https://discuss.elastic.co/t/couldnt-extract-filename-from-source-field/47218/2 "2016-04-15T06:02:17Z")

</div>

Well, what does your `source` field look like?

---

<div class="post-metadata">

### Author: ![rajkamalkool6](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@rajkamalkool6](https://discuss.elastic.co/u/rajkamalkool6)
#### Post date: [April 18, 2016, 9:25am UTC](https://discuss.elastic.co/t/couldnt-extract-filename-from-source-field/47218/3 "2016-04-18T09:25:56Z")

</div>

My source filed contains this value

`/syslog/usd/logs/data/4cce4fc9-d150-489d-869e-30968814825f_data.xml`

I am trying to extract the filename from the grok pattern mentioned above but its not working . it was working in Logstash version 1.5.4 but not in current one.

---

<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: [July 6, 2017, 5:01am UTC](https://discuss.elastic.co/t/couldnt-extract-filename-from-source-field/47218/4 "2017-07-06T05:01:53Z")

</div>


