如何将存储在 AWS RDS 中的所有数据发送到 elasticsearch(Linux)?
How can I send all the data stored in AWS RDS to elasticsearch(Linux)?
如何将存储在 AWS RDS 中的所有数据发送到 elasticsearch?
我想将 data values stored in AWS RDS
保存到 elasticsearch。
我的代码
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
}
}
以上代码执行但出现错误。(尝试)
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
不知道为什么会报错。
帮帮我。
DatabaseConnectionError
- 在 AWS RDS 上打开数据库端口 3306。
- 运行 Linux.
上的 elasticsearch 和 kibana
- 检查 conf 文件是否有错误。
Do the 3 things above and tell me the result.
如何将存储在 AWS RDS 中的所有数据发送到 elasticsearch?
我想将 data values stored in AWS RDS
保存到 elasticsearch。
我的代码
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
}
}
以上代码执行但出现错误。(尝试)
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
不知道为什么会报错。 帮帮我。
DatabaseConnectionError
- 在 AWS RDS 上打开数据库端口 3306。
- 运行 Linux. 上的 elasticsearch 和 kibana
- 检查 conf 文件是否有错误。
Do the 3 things above and tell me the result.