# Sending stdout and stderr to different elasticsearch hosts and kibana

**URL:** https://discuss.elastic.co/t/sending-stdout-and-stderr-to-different-elasticsearch-hosts-and-kibana/335445
**Category:** Beats
**Tags:** docker, filebeat
**Created:** [June 7, 2023, 1:41pm UTC](https://discuss.elastic.co/t/sending-stdout-and-stderr-to-different-elasticsearch-hosts-and-kibana/335445 "2023-06-07T13:41:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Shobana\_Nagarajan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shobana_nagarajan/32/121930_2.png) [@Shobana\_Nagarajan](https://discuss.elastic.co/u/Shobana_Nagarajan)
#### Post date: [June 7, 2023, 1:41pm UTC](https://discuss.elastic.co/t/sending-stdout-and-stderr-to-different-elasticsearch-hosts-and-kibana/335445/1 "2023-06-07T13:41:16Z")

</div>

Hi,  
I have a requirement to send stdout and stderr to different Elastic and Kibana hosts. I have deployed two filebeat containers. Here are my filebeat.yml.  
1.filebeat.stdout.yml

```auto
filebeat.config:
  modules:
    path: ${path.config}/modules.d/*.yml
    reload.enabled: false

filebeat.autodiscover:
  providers:
    - type: docker
      hints.enabled: true

processors:
- add_cloud_metadata: ~

filebeat.inputs:
- type: container
  enabled: true

  # Paths for container logs that should be crawled and fetched.
  paths:
    -/var/lib/docker/containers/*/*.log

  # Configure stream to filter to a specific stream: stdout, stderr or all (default)
  stream: stdout
    
output.elasticsearch:
  hosts: '${ELASTICSEARCH_HOSTS:<elasic_ip1>:9200}'

2.filebeat.stderr.yml
filebeat.config:
  modules:
    path: ${path.config}/modules.d/*.yml
    reload.enabled: false

filebeat.autodiscover:
  providers:
    - type: docker
      hints.enabled: true

processors:
- add_cloud_metadata: ~

filebeat.inputs:
- type: container
  enabled: true

  # Paths for container logs that should be crawled and fetched.
  paths:
    -/var/lib/docker/containers/*/*.log

  # Configure stream to filter to a specific stream: stdout, stderr or all (default)
  stream: stderr
    
output.elasticsearch:
  hosts: '${ELASTICSEARCH_HOSTS:<elasticIP2>9200}'

```

Is the above method right? I donot see my container logs in Kibana instances.  
Any help would be appreciated . I am a total newbie to Elasticsearch.  
Thanks

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [June 7, 2023, 11:02pm UTC](https://discuss.elastic.co/t/sending-stdout-and-stderr-to-different-elasticsearch-hosts-and-kibana/335445/2 "2023-06-07T23:02:07Z")

</div>

Welcome to our community! 😃

Do you mean different Elasticsearch clusters?

---

<div class="post-metadata">

### Author: ![Shobana\_Nagarajan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shobana_nagarajan/32/121930_2.png) [@Shobana\_Nagarajan](https://discuss.elastic.co/u/Shobana_Nagarajan)
#### Post date: [June 8, 2023, 3:23am UTC](https://discuss.elastic.co/t/sending-stdout-and-stderr-to-different-elasticsearch-hosts-and-kibana/335445/3 "2023-06-08T03:23:31Z")

</div>

Yes, I want to send the streams to different elastic clusters. elastic\_ip1 is the host where i want to send the stdout stream. elastic\_ip2 is the host where i want to send the stderr stream.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [June 8, 2023, 10:51pm UTC](https://discuss.elastic.co/t/sending-stdout-and-stderr-to-different-elasticsearch-hosts-and-kibana/335445/4 "2023-06-08T22:51:22Z")

</div>

That looks right from what I can tell. What do your docker configs look like?

---

<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: [July 7, 2023, 12:52am UTC](https://discuss.elastic.co/t/sending-stdout-and-stderr-to-different-elasticsearch-hosts-and-kibana/335445/5 "2023-07-07T00:52:16Z")

</div>

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