# Capturing servername and appending/propogating it to all other lines of logfile

**URL:** <https://discuss.elastic.co/t/capturing-servername-and-appending-propogating-it-to-all-other-lines-of-logfile/277876>\
**Category:** Logstash\
**Created:** [July 5, 2021, 6:53pm UTC](https://discuss.elastic.co/t/capturing-servername-and-appending-propogating-it-to-all-other-lines-of-logfile/277876 "2021-07-05T18:53:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 5, 2021, 8:43pm UTC](https://discuss.elastic.co/t/capturing-servername-and-appending-propogating-it-to-all-other-lines-of-logfile/277876/2 "2021-07-05T20:43:41Z")

</div>

There is an example of capturing data from one line and adding it to others [here](https://discuss.elastic.co/t/how-to-parse-dir-command-output-from-txt-file-and-append-filenames-to-directory/276185/4). Note the prerequisites at the end of that post.

---

_[View the full topic](https://discuss.elastic.co/t/capturing-servername-and-appending-propogating-it-to-all-other-lines-of-logfile/277876)._
