How can I send all the data stored in AWS RDS to elasticsearch?
I want to save the data values stored in AWS RDS to elasticsearch.
my code
input {
jdbc {
clean_run => true
jdbc_driver_library => "C:\ElasticSearch\mysql-connector-java-8.0.23\mysql-connector-java-8.0.23.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://awslink:3306/schema_name"
jdbc_user => "root"
jdbc_password => "1234"
schedule => "* * * * *"
statement => "select * from schema_name"
}
}
output{
elasticsearch {
hosts => "52.188.20.167:9200"
index => "aws_db_test"
}
stdout {
codec => rubydebug
}
}
above code execute but error occured.(attempt)
error message 1
[2021-05-13T14:43:22,484][ERROR][logstash.inputs.jdbc ][main][45d45ca85cb44ad7abd67688adda06f1bd6999bc38e26e71902a47b492a7d6f9] Unable to connect to database. Tried 1 times {:error_message=>"Java::ComMysqlCjJdbcExceptions::CommunicationsException: Communications link failure\n\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server."}
{ 2052 rufus-scheduler intercepted an error:
2052 job:
2052 Rufus::Scheduler::CronJob "* * * * *" {}
2052 error:
2052 2052
2052 Sequel::DatabaseConnectionError
2052 Java::ComMysqlCjJdbcExceptions::CommunicationsException: Communications link failure
}
error message 2
[2021-05-13T14:44:21,425][ERROR][logstash.inputs.jdbc ][main][45d45ca85cb44ad7abd67688adda06f1bd6999bc38e26e71902a47b492a7d6f9] Unable to connect to database. Tried 1 times {:error_message=>"Java::ComMysqlCjJdbcExceptions::CommunicationsException: Communications link failure\n\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server."}
{ 2054 rufus-scheduler intercepted an error:
2054 job:
2054 Rufus::Scheduler::CronJob "* * * * *" {}
2054 error:
2054 2054
2054 Sequel::DatabaseConnectionError
2054 Java::ComMysqlCjJdbcExceptions::CommunicationsException: Communications link failure
I don't know why the error occurs. help me.