# Logstash S3 filename parsing

**URL:** <https://discuss.elastic.co/t/logstash-s3-filename-parsing/108415>\
**Category:** Logstash\
**Created:** [November 20, 2017, 3:26pm UTC](https://discuss.elastic.co/t/logstash-s3-filename-parsing/108415 "2017-11-20T15:26:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![erikkn](https://avatars.discourse-cdn.com/v4/letter/e/e95f7d/32.png) [@erikkn](https://discuss.elastic.co/u/erikkn)\
**Post date:** [November 20, 2017, 3:26pm UTC](https://discuss.elastic.co/t/logstash-s3-filename-parsing/108415/1 "2017-11-20T15:26:09Z")

</div>

For the input I am using the Logstash S3 plugin. We are putting quite some information in the name of our log files, an example log filename:

`<pr-number>-<author>-<date>-<branch>.log`

Could someone help me how to parse through the filename and how to set attributes based on this data?

Thanks 🙂

---

<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 18, 2017, 3:26pm UTC](https://discuss.elastic.co/t/logstash-s3-filename-parsing/108415/2 "2017-12-18T15:26:15Z")

</div>

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