# Extract server name used by FileBeats to connect to LogStash

**URL:** https://discuss.elastic.co/t/extract-server-name-used-by-filebeats-to-connect-to-logstash/183495
**Category:** Logstash
**Created:** [May 30, 2019, 9:13am UTC](https://discuss.elastic.co/t/extract-server-name-used-by-filebeats-to-connect-to-logstash/183495 "2019-05-30T09:13:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![funduraghu](https://avatars.discourse-cdn.com/v4/letter/f/e95f7d/32.png) [@funduraghu](https://discuss.elastic.co/u/funduraghu)
#### Post date: [May 30, 2019, 9:13am UTC](https://discuss.elastic.co/t/extract-server-name-used-by-filebeats-to-connect-to-logstash/183495/1 "2019-05-30T09:13:42Z")

</div>

I've set up multiple FileBeats instances on different machines to send syslog to a single central LogStash server.  
I have created ssl certs and have setup SSL communication (as explained in documentation) between FileBeats & LogStash.  
Each FileBeats instances uses a different dns name to send logs, but all these dns names resolve to same LogStash instance.  
The flow is working fine and I'm seeing logs on LogStash end.

Now, I want to differentiate the incoming logs at LogStash end based on dns name used by FileBeats.  
I can't use different ports because there may be hundreds of FileBeats instances and it will not be scalable.

Is there a way to obtain the dns name in LogStash?  
Will SNI be available in LogStash?

---

<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: [May 30, 2019, 12:10pm UTC](https://discuss.elastic.co/t/extract-server-name-used-by-filebeats-to-connect-to-logstash/183495/2 "2019-05-30T12:10:11Z")

</div>

If every filebeat is configured to use a different dns name for logstash, can you also configure them to add that name to the events using a fields option?

---

<div class="post-metadata">

### Author: ![funduraghu](https://avatars.discourse-cdn.com/v4/letter/f/e95f7d/32.png) [@funduraghu](https://discuss.elastic.co/u/funduraghu)
#### Post date: [May 31, 2019, 6:01am UTC](https://discuss.elastic.co/t/extract-server-name-used-by-filebeats-to-connect-to-logstash/183495/3 "2019-05-31T06:01:58Z")

</div>

That is a possible solution.  
However, is there any way on LogStash end to extract the dns name used assuming that we can't add a new field on client side?

---

<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: [May 31, 2019, 11:45am UTC](https://discuss.elastic.co/t/extract-server-name-used-by-filebeats-to-connect-to-logstash/183495/4 "2019-05-31T11:45:14Z")

</div>

> [@funduraghu](#):
>
> However, is there any way on LogStash end to extract the dns name used

Not that I can think of.

---

<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: [June 28, 2019, 11:45am UTC](https://discuss.elastic.co/t/extract-server-name-used-by-filebeats-to-connect-to-logstash/183495/5 "2019-06-28T11:45:15Z")

</div>

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