title: Moving indexes between ElasticSearch clusters
body: <p>I've installed logstash locally and I'm attempting to copy an index between elasticsearch clusters.</p>
  
  <p>I have a local elasticsearch configured on port 9210 and a remote ES cluster hosted in IBM Bluemix. I've setup the logstash.conf as below:</p>
  
  <pre><code>input {
    elasticsearch {
      hosts =&gt; [ "localhost:9210" ]
      index =&gt; "lon02-daily-2017.08.30"
      size =&gt; 500
      scroll =&gt; "5m"
      docinfo =&gt; true
    }
  }
  
  output {
    # We write to the "new" cluster
    elasticsearch {
      hosts =&gt; ["https://xxxxxxx:19459/"]
      user =&gt; "xxxxxx"
      password =&gt; "xxxxxxx"
      index =&gt; "%{[@metadata][_index]}"
      document_type =&gt; "%{[@metadata][_type]}"
      document_id =&gt; "%{[@metadata][_id]}"
    }
    # We print dots to see it in action
    stdout {
      codec =&gt; "dots"
    }
  }
  </code></pre>
  
  <p>However when I run ./logstash -f logstash.conf I get the following error (posted below) which suggests that logstash can't connect to the remote cluster, however I can contact it via curl as below:
  curl -u xxxxxx:xxxxxxx <a href="https://xxxxxxx:19459/" rel="nofollow noreferrer">https://xxxxxxx:19459/</a></p>
  
  <pre><code>Attempted to send a bulk request to Elasticsearch configured at
  ["https://xxxx:19459/"]', but an error occurred and it failed! 
  Are you sure you can reach elasticsearch from this machine using the configuration provided?
  </code></pre>
  
  <p>I think means that logstash isn't using the credentials in logstash.conf. Can anyone spot what I'm doing wrong here?</p>