I have followed the steps in the below doc to enable security ;
Everything seems to have worked. HOwever, when I start logstash, i get the below error :
[2020-05-24T02:16:15,655][WARN ][logstash.outputs.elasticsearch][main] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://localhost:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError, :error=>"Got response code '401' contacting Elasticsearch at URL 'http://localhost:9200/'"}
[2020-05-24T02:16:15,669][WARN ][logstash.outputs.elasticsearch][main] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://localhost:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError, :error=>"Got response code '401' contacting Elasticsearch at URL 'http://localhost:9200/'"}
[2020-05-24T02:16:15,683][WARN ][logstash.outputs.elasticsearch][main] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://localhost:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError, :error=>"Got response code '401' contacting Elasticsearch at URL 'http://localhost:9200/'"}
I have not made any changes to logstash.yml file.
Could you please let me know what am I missing here ?
When I try to connect directly, it seems to be working.
401 is authentication error, while 403 is authorization error
your logstash_user is trying to install template in elasticsearch but it doesn’t seem to have privileges to do so. what’s your logstash_user privileges that you configure ? you will need manage_index_templates on cluster level to manage index templates.
Created the role : logstash_writer
For cluster privileges, i have added manage_index_templates and monitor .
For indices privileges, I have added write , create , delete , and create_index
Created logstash_internal user and assigned the role logstash_writer to that user.
Then created a role logstash_reader
The role has access to : read and view_index_metadata privileges for the Logstash indices
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.