Set logstash cloud output hosts

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

output {
elasticsearch {
hosts => ""
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
[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=>[]}}
[2018-01-08T00:23:01,899][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>, :path=>"/"}
[2018-01-08T00:23:07,509][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError, :error=>"Got response code '401' contacting Elasticsearch at URL ''"}

You should need to put in authentication details.

Could you give me an example please?, 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?


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