Set logstash cloud output hosts

hello,
I am trying to set Logstash configuration file output hosts as Elasticsearch cloud link

output {
elasticsearch {
hosts => "https://5something3.us-east-1.aws.found.io:9243"
index => "check1"
}
stdout {}

Unfortunately when I run this file I get an error:

ending Logstash's logs to /Users/myuser/Downloads/logstash-6.1.1/logs which is now configured via log4j2.properties
[2018-01-08T00:22:57,046][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"/Users/myuser/Downloads/logstash-6.1.1/modules/netflow/configuration"}
[2018-01-08T00:22:57,071][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"/Users/myuser/Downloads/logstash-6.1.1/modules/fb_apache/configuration"}
[2018-01-08T00:22:57,376][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-01-08T00:22:57,416][INFO ][logstash.agent ] No persistent UUID file found. Generating new UUID {:uuid=>"00888642-3ae4-404e-a673-64f143bc9d0b", :path=>"/Users/myuser/Downloads/logstash-6.1.1/data/uuid"}
[2018-01-08T00:22:57,933][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.1.1"}
[2018-01-08T00:22:58,367][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2018-01-08T00:23:01,888][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[https://5something3.us-east-1.aws.found.io:9243/]}}
[2018-01-08T00:23:01,899][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>https://5something3.us-east-1.aws.found.io:9243/, :path=>"/"}
[2018-01-08T00:23:07,509][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"https://5bsomething3.us-east-1.aws.found.io:9243/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError, :error=>"Got response code '401' contacting Elasticsearch at URL 'https://5something3.us-east-1.aws.found.io:9243/'"}

You should need to put in authentication details.

Could you give me an example please?

https://www.elastic.co/guide/en/logstash/6.1/plugins-inputs-elasticsearch.html#plugins-inputs-elasticsearch-options, specifically user and password.

Can I set the authentication details in the input? I set the input to be a CSV file, can it be both?

Sorry, https://www.elastic.co/guide/en/logstash/6.1/plugins-outputs-elasticsearch.html#plugins-inputs-elasticsearch-options.

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