# Question on Shipping logs from multiple microservice to Elasticsearch

**URL:** https://discuss.elastic.co/t/question-on-shipping-logs-from-multiple-microservice-to-elasticsearch/300738
**Category:** Beats
**Tags:** filebeat
**Created:** [March 26, 2022, 12:15am UTC](https://discuss.elastic.co/t/question-on-shipping-logs-from-multiple-microservice-to-elasticsearch/300738 "2022-03-26T00:15:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Pradeep\_Kumar3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pradeep_kumar3/32/103550_2.png) [@Pradeep\_Kumar3](https://discuss.elastic.co/u/Pradeep_Kumar3)
#### Post date: [March 26, 2022, 12:15am UTC](https://discuss.elastic.co/t/question-on-shipping-logs-from-multiple-microservice-to-elasticsearch/300738/1 "2022-03-26T00:15:54Z")

</div>

I am considering pushing the application logs from multiple microservices using filebeats to a remote logstash server. Will the fiebeat acquire the lock on the logstash server to write the file? What are the considerations and best practices for pushing the logs from filebeats to logstash server.

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [March 26, 2022, 2:58am UTC](https://discuss.elastic.co/t/question-on-shipping-logs-from-multiple-microservice-to-elasticsearch/300738/2 "2022-03-26T02:58:29Z")

</div>

@Pradeep_Kumar3 Welcome to the community.

> [@Pradeep\_Kumar3](#):
>
> Will the fiebeat acquire the lock on the logstash server to write the file?

I am not sure what that means.

Many Filebeats can send logs to a single logstash instance (or multiple)

Filebeat will use the [logstash output](https://www.elastic.co/guide/en/beats/filebeat/current/logstash-output.html).

Logstash will use the [beats input](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-beats.html)

And a generic basic logstash pipeline would look like [this](https://www.elastic.co/guide/en/logstash/current/use-ingest-pipelines.html) if you are using filebeat modules

```auto
input {
  beats {
    port => 5044
  }
}

output {
  if [@metadata][pipeline] {
    elasticsearch {
      hosts => "https://061ab24010a2482e9d64729fdb0fd93a.us-east-1.aws.found.io:9243"
      manage_template => false
      index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
      pipeline => "%{[@metadata][pipeline]}" 
      user => "elastic"
      password => "secret"
    }
  } else {
    elasticsearch {
      hosts => "https://061ab24010a2482e9d64729fdb0fd93a.us-east-1.aws.found.io:9243"
      manage_template => false
      index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
      user => "elastic"
      password => "secret"
    }
  }
}

```

---

<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: [April 23, 2022, 4:59am UTC](https://discuss.elastic.co/t/question-on-shipping-logs-from-multiple-microservice-to-elasticsearch/300738/3 "2022-04-23T04:59:23Z")

</div>

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