# ElasticAgent to multiple locations

**URL:** <https://discuss.elastic.co/t/elasticagent-to-multiple-locations/334989>\
**Category:** Elastic Agent\
**Tags:** filebeat\
**Created:** [June 1, 2023, 2:05pm UTC](https://discuss.elastic.co/t/elasticagent-to-multiple-locations/334989 "2023-06-01T14:05:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![willsy](https://avatars.discourse-cdn.com/v4/letter/w/f17d59/32.png) [@willsy](https://discuss.elastic.co/u/willsy)\
**Post date:** [June 1, 2023, 2:05pm UTC](https://discuss.elastic.co/t/elasticagent-to-multiple-locations/334989/1 "2023-06-01T14:05:20Z")

</div>

I'm using the default elastic agents with windows integrations and some linux ones with linux integrations.

Is there a way to send the data from these agents to two locations and two ports? a logstash and elasticsearch server specifically.

If so how would i go about this? i saw it can be done to different Elasticsearch nodes, from fleet, can this be done to a log and elastic server?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [June 1, 2023, 2:15pm UTC](https://discuss.elastic.co/t/elasticagent-to-multiple-locations/334989/2 "2023-06-01T14:15:59Z")

</div>

> [@willsy](#):
>
> Is there a way to send the data from these agents to two locations and two ports? a logstash and elasticsearch server specifically.

No, this is not possible, the Elastic Agent runs beats behind the scenes and the beats only supports one output.

> [@willsy](#):
>
> i saw it can be done to different Elasticsearch nodes, from fleet, can this be done to a log and elastic server?

Can you share what you saw and where?

---

<div class="post-metadata">

**Author:** ![willsy](https://avatars.discourse-cdn.com/v4/letter/w/f17d59/32.png) [@willsy](https://discuss.elastic.co/u/willsy)\
**Post date:** [June 1, 2023, 2:52pm UTC](https://discuss.elastic.co/t/elasticagent-to-multiple-locations/334989/3 "2023-06-01T14:52:57Z")

</div>

Oh ok, that doenst help my issue, ill have to attempt to send it to elastic and then on the same machine into logstash some how.

so on elasticsearch, fleet\> Settings\> Outputs, "add output" under type it says Elasticsearch or Logstash. so i assume you could.... I just dont know the configuration for this.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [June 1, 2023, 3:01pm UTC](https://discuss.elastic.co/t/elasticagent-to-multiple-locations/334989/4 "2023-06-01T15:01:18Z")

</div>

> [@willsy](#):
>
> so on elasticsearch, fleet\> Settings\> Outputs, "add output" under type it says Elasticsearch or Logstash. so i assume you could.... I just dont know the configuration for this.

You could send the output of an Elastic Agent to Elasticsearch **OR** to Logstash, but not both at the same time, only one output is allowed.

> [@willsy](#):
>
> Oh ok, that doenst help my issue, ill have to attempt to send it to elastic and then on the same machine into logstash some how.

What you can do is configure the Elastic Agent to send logs to Logstash and use Logstash to send those logs to other places as it allows you to have more outputs.

There are some configuration changes that you need to do to make the integrations work while sending logs to Logstash, you need to check the documentation.

---

<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 29, 2023, 3:01pm UTC](https://discuss.elastic.co/t/elasticagent-to-multiple-locations/334989/5 "2023-06-29T15:01:42Z")

</div>

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