elasticsearch 从mysql导入数据错误-管道已终止
通过kibana将数据从mysql导入弹性搜索 获取警告-忽略“pipelines.yml”文件,因为指定了模块或命令行选项 及 管道已终止{:Pipeline_id=>“main”,:thread=>“#”} 还有我的密码
elasticsearch 从mysql导入数据错误-管道已终止,
elasticsearch,logstash,kibana,
elasticsearch,Logstash,Kibana,通过kibana将数据从mysql导入弹性搜索 获取警告-忽略“pipelines.yml”文件,因为指定了模块或命令行选项 及 管道已终止{:Pipeline_id=>“main”,:thread=>“#”} 还有我的密码 input { jdbc { jdbc_driver_library => "mysql-connector-java-5.1.46-bin.jar" jdbc_driver_class => "com.mysql.jdbc.Driver"
input {
jdbc {
jdbc_driver_library => "mysql-connector-java-5.1.46-bin.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/test"
jdbc_user => "root"
jdbc_password => "***"
statement => "SELECT * from Test"
}
}
output{
stdout { codec => json_lines }
elasticsearch {
"hosts" => "localhost:9200"
"index" => "test-migrate"
"document_type" => "data"
}
}
是否有此解决方案?默认情况下,如果您在不使用调度的情况下运行单个查询,logstash管道将在处理查询后终止。 您需要在
jdbc
input中启用调度以定期运行它,如下所示
input {
jdbc {
jdbc_driver_library => "mysql-connector-java-5.1.46-bin.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/test"
schedule => "0 * * * *"
jdbc_user => "root"
jdbc_password => "***"
statement => "SELECT * from Test"
}
}
这将在每天每小时的第0分钟执行查询。
schedule的语法非常类似于cron。请查看语法和更多详细信息。不要提供可以是文本的图像信息。