# Setting hostname for specific log files being shipped with filebeat

**URL:** <https://discuss.elastic.co/t/setting-hostname-for-specific-log-files-being-shipped-with-filebeat/257431>\
**Category:** Beats\
**Created:** [December 3, 2020, 12:04am UTC](https://discuss.elastic.co/t/setting-hostname-for-specific-log-files-being-shipped-with-filebeat/257431 "2020-12-03T00:04:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![afc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/afc/32/80131_2.png) [@afc](https://discuss.elastic.co/u/afc)\
**Post date:** [December 3, 2020, 12:04am UTC](https://discuss.elastic.co/t/setting-hostname-for-specific-log-files-being-shipped-with-filebeat/257431/1 "2020-12-03T00:04:24Z")

</div>

Greetings!

I've been setting up a centralized log server to collect data from our servers, switches, access points etc. I have a folder on the log server that contains apache log files from a remote machine (/var/log/production). Currently I have filebeat picking up this log data and sending it into elasticsearch. My problem is when I query elasticsearch for data that I know to be coming from the remote machine, the results are showing that the hostname for this data is the logserver itself. Is there a way to configure filebeat.yml or my filebeat module to specify the hostname for these particular log files before it goes to elasticsearch?  
Apologies if this seems trivial or a roundabout way of doing things, i'm an elastic noob.

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 31, 2020, 12:04am UTC](https://discuss.elastic.co/t/setting-hostname-for-specific-log-files-being-shipped-with-filebeat/257431/2 "2020-12-31T00:04:47Z")

</div>

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