# Logstash into another server

**URL:** <https://discuss.elastic.co/t/logstash-into-another-server/79364>\
**Category:** Logstash\
**Created:** [March 21, 2017, 8:05am UTC](https://discuss.elastic.co/t/logstash-into-another-server/79364 "2017-03-21T08:05:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allie\_Yang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/allie_yang/32/16538_2.png) [@Allie\_Yang](https://discuss.elastic.co/u/Allie_Yang)\
**Post date:** [March 21, 2017, 8:05am UTC](https://discuss.elastic.co/t/logstash-into-another-server/79364/1 "2017-03-21T08:05:25Z")

</div>

Just want to confirm I am doing the right thing: if i want to logstash to another ES server at [https://example.com](https://example.com), should i just do below in logstash config output section? I do need the port there, right?

```
output {

        elasticsearch {
             #hosts => ["localhost:9200"]
             hosts => ["https://example.com:9200"]
             user => elastic
             password => changeme
             index => "generic_logs"
             document_type => "generic"
        }
      
        stdout { codec => rubydebug }
    }
```

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [March 21, 2017, 8:13am UTC](https://discuss.elastic.co/t/logstash-into-another-server/79364/2 "2017-03-21T08:13:31Z")

</div>

That looks fine. The port should default to 9200.

---

<div class="post-metadata">

**Author:** ![Allie\_Yang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/allie_yang/32/16538_2.png) [@Allie\_Yang](https://discuss.elastic.co/u/Allie_Yang)\
**Post date:** [March 22, 2017, 7:42pm UTC](https://discuss.elastic.co/t/logstash-into-another-server/79364/4 "2017-03-22T19:42:18Z")

</div>

What does below error possibly mean? The server is hosted on S3, could it be I need authentication?

[WARN][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=\>#\<URI::HTTPS:0x34b76f0f URL:https://~hidden~:~hidden~@search-adobestock-logs-dd67iqphmey3gudexe7azmrnwu.us-east-1.es.amazonaws.com:9200\>, :error\_type=\>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=\>"Elasticsearch Unreachable: [https://~hidden~:~hidden~@search-adobestock-logs-dd67iqphmey3gudexe7azmrnwu.us-east-1.es.amazonaws.com:9200][Manticore::ConnectTimeout] connect timed out"}

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [March 22, 2017, 8:06pm UTC](https://discuss.elastic.co/t/logstash-into-another-server/79364/5 "2017-03-22T20:06:53Z")

</div>

Logstash appears to be having connection problems. Perhaps you need to access the server via a proxy?

AWS, not S3. S3 is the storage service and you can't run ES there.

---

<div class="post-metadata">

**Author:** ![Allie\_Yang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/allie_yang/32/16538_2.png) [@Allie\_Yang](https://discuss.elastic.co/u/Allie_Yang)\
**Post date:** [March 22, 2017, 9:00pm UTC](https://discuss.elastic.co/t/logstash-into-another-server/79364/6 "2017-03-22T21:00:18Z")

</div>

Yea sorry I mean AWS. Could you point the direction how can I access via a proxy? Thanks!!

---

<div class="post-metadata">

**Author:** ![Allie\_Yang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/allie_yang/32/16538_2.png) [@Allie\_Yang](https://discuss.elastic.co/u/Allie_Yang)\
**Post date:** [March 22, 2017, 9:07pm UTC](https://discuss.elastic.co/t/logstash-into-another-server/79364/7 "2017-03-22T21:07:09Z")

</div>

Never mind, i managed to make it work in this way in output section (terminal with cli access to aws)

However, if i don't use cli access, but use access-key in comment below, it says `but an error occurred and it failed! Are you sure you can reach elasticsearch from this machine using the configuration provided?`. Both cli and the access key come from same person... Would you know why? Thanks!

```
amazon_es {
    hosts => ["example.com"]
    region => "us-east-1"
    # aws_access_key_id, aws_secret_access_key optional if instance profile is configured
    #aws_access_key_id => 'aaaaaaaa'
    #aws_secret_access_key => '99999999'
    index => "generic_logs"
}
```

---

<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 19, 2017, 9:07pm UTC](https://discuss.elastic.co/t/logstash-into-another-server/79364/8 "2017-04-19T21:07:33Z")

</div>

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