Hi everyone,
I'm new to ELK and I have never used AWS Elasticsearch before.
I'm trying to migrate data from mysql server to aws elasticsearch using logstash.
However, I got an error saying something like this:
[ERROR][logstash.pipeline ] Error registering plugin {:pipeline_id=>"main", :plugin=>"<LogStash::OutputDelegator:0x3ad80dbe>", :error=>"undefined method `credentials' for nil:NilClass", :thread=>"#<Thread:0x1cddccdd run>"}
[ERROR][logstash.pipeline ] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<NoMethodError: undefined method `credentials' for nil:NilClass>,
[ERROR][logstash.agent ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create<main>, action_result: false", :backtrace=>nil}
[ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Stop/pipeline_id:main, :exception=>"NoMethodError", :message=>"undefined method `unlock' for nil:NilClass"
I installed aws logstash plugin using:
bin/logstash-plugin install logstash-output-amazon_es
And my config file is the following:
input {
jdbc {
jdbc_driver_library => "/library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/mysql-connector-java-8.0.13.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql:SOMETHING"
jdbc_user => "USER"
jdbc_password => "PASSWORD"
statement => "select * from TABLE_NAME"
}
}
output {
amazon_es {
hosts => ["MY_AWS_ES_DOMAIN"]
region => "REGION"
index => "INDEX_NAME"
document_type => "TYPE"
}
stdout {
codec => rubydebug
}
}
Please help me find the way out from this :'(( Thank you so much in advance!
Thanks, Sam