I am not able to connect my logstash instance on my local server with Elastic Search on Elastic Cloud . The user tag in logstash encodes the @ symbol in the email address twice to %2540. I guess because of this Elastic Cloud is not able to identify the credentials specified on logstash.config file.
I have provided the valid Cloud ID and Cloud Authentication Details in logstash.yml file
input {
file {
path => "C:/Users/abc/Downloads/reed_uk.csv"
start_position => "beginning"
}
}
filter {
csv {
columns => [ "category","city","company_name","geo","job_board","job_description","job_requirements","job_title","job_type","post_date","salary_offered","state" ]
}
}
output {
elasticsearch {
hosts => ["https://444d61228d4d407f8e42b438e01b28c1.us-east-1.aws.found.io:9243"]
user => <Elastic-Cloud-Email-Address}
password => <Elastic-Cloud-Password}
index => "sampleindex"
}
stdout {}
}
This is the error I am getting on starting logstash on my local server -
error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError, :error=>"Got response code '401' contacting Elasticsearch at URL 'https://444d61228d4d407f8e42b438e01b28c1.us-east-1.aws.found.io:9243/'"}