# How to how can I create a logstash filter to generate log with filename

**URL:** <https://discuss.elastic.co/t/how-to-how-can-i-create-a-logstash-filter-to-generate-log-with-filename/153574>\
**Category:** Logstash\
**Created:** [October 23, 2018, 10:17am UTC](https://discuss.elastic.co/t/how-to-how-can-i-create-a-logstash-filter-to-generate-log-with-filename/153574 "2018-10-23T10:17:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![naga\_kunchala](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@naga\_kunchala](https://discuss.elastic.co/u/naga_kunchala)\
**Post date:** [October 23, 2018, 10:17am UTC](https://discuss.elastic.co/t/how-to-how-can-i-create-a-logstash-filter-to-generate-log-with-filename/153574/1 "2018-10-23T10:17:17Z")

</div>

i have wrote the logstash configuration file to get the all server application logs using udp input filter. i can able to created individual server log by host filed but i cant able get the logs with file name. could you please help me , how to write a filter to save logs with filename

---

<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:** [November 20, 2018, 10:17am UTC](https://discuss.elastic.co/t/how-to-how-can-i-create-a-logstash-filter-to-generate-log-with-filename/153574/2 "2018-11-20T10:17:18Z")

</div>

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