# Handling multiple client's filebeat on logstash

**URL:** https://discuss.elastic.co/t/handling-multiple-clients-filebeat-on-logstash/244768
**Category:** Logstash
**Tags:** docker
**Created:** [August 12, 2020, 6:17pm UTC](https://discuss.elastic.co/t/handling-multiple-clients-filebeat-on-logstash/244768 "2020-08-12T18:17:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Jagadeesan\_A](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jagadeesan_a/32/47985_2.png) [@Jagadeesan\_A](https://discuss.elastic.co/u/Jagadeesan_A)
#### Post date: [August 12, 2020, 6:17pm UTC](https://discuss.elastic.co/t/handling-multiple-clients-filebeat-on-logstash/244768/1 "2020-08-12T18:17:02Z")

</div>

I want to run filebeats on "n" number of clients, on logstash how can i distinguish each client's filebeat.

1. Is there any way to include client name in indexing.
2. Am able to read geo name in each filebeat message. Is there way to add [\_source][host][geo][name] in index.
3. Any other better option for this use case .

---

<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: [August 12, 2020, 6:57pm UTC](https://discuss.elastic.co/t/handling-multiple-clients-filebeat-on-logstash/244768/2 "2020-08-12T18:57:32Z")

</div>

The metadata that filebeat adds includes the hostname. You can use a [sprintf reference](https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#sprintf) to that in the index name.

---

<div class="post-metadata">

### Author: ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)
#### Post date: [August 12, 2020, 8:32pm UTC](https://discuss.elastic.co/t/handling-multiple-clients-filebeat-on-logstash/244768/3 "2020-08-12T20:32:17Z")

</div>

or I think you can do this as well to see what @metadata is on output

output {  
stdout { codec =\> rubydebug { metadata =\> "true" } }  
}

---

<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: [September 9, 2020, 8:32pm UTC](https://discuss.elastic.co/t/handling-multiple-clients-filebeat-on-logstash/244768/4 "2020-09-09T20:32:19Z")

</div>

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