在将mysql数据传输到kibana时出现logstash配置错误,sql db密码为空,因此我传递了jdbc_password =“”

我想使用Logstash和JDBC将MySQL表数据上传到kibana。
MYSql数据库的用户名是“ root”,密码是空白。我尝试将密码设置为“”和“”,“ Null”,但无法正常工作。

这是我的logstash配置文件:

input {
    jdbc {
        jdbc_driver_library => "C:/elasticsearch-7.3.0/driver/com.mysql.jdbc_5.1.5.jar"
        jdbc_driver_class => "com.mysql.jdbc.Driver"
        jdbc_connection_string => "jdbc:mysql://localhost:3306/dbname?useSSL=false"
        jdbc_user => "root"
        jdbc_password=>" " 
        statement => "SELECT * FROM table"
    }
}
output {  
    stdout { codec => rubydebug }
    elasticsearch {
        hosts => ["localhost"]
        index => "index_name"
    }
}

logstash输出:

[2019-11-06T13:02:28,143] [错误] [logstash.inputs.jdbc]无法加载C:/elasticsearch-7.3.0/driver/com.mysql.jdbc_5.1.5.jar {:exception =>#} [2019-11-06T13:02:28,146] [错误] [logstash.javapipeline]插件发生不可恢复的错误。将重新启动此插件。   Pipeline_id:main   插件:“ root”,jdbc_password =>,语句=>“ SELECT * FROM跟踪器”,jdbc_driver_library =>“ C:/elasticsearch-7.3.0/driver/com.mysql.jdbc_5.1.5.jar”,jdbc_connection_string =>” jdbc:mysql:// localhost:3306 / pvtrace?useSSL = false“,id =>” 5eccb173adcbec4cd0c68701c4737d83e11f82fdc157788bc9b76507e2a70a06“,jdbc_driver_class =>” com.mysql.jdbc.Driver“,enable_metric = -d = 4,true,code 4050-8044-04f466e0c157“,enable_metric => true,charset =>” UTF-8“>,jdbc_paging_enabled => false,jdbc_page_size => 100000,jdbc_validate_connection => false,jdbc_validation_timeout => 3600,jdbc_pool_timeout => 5,sql_log_ “信息”,connection_retry_attempts => 1,connection_retry_attempts_wait_time => 0.5,参数=> {“ sql_last_value” => 1970-01-01 00:00:00 UTC},last_run_metadata_path =>“ C:\ Users \ himanshika.yeduvans /。 logstash_jdbc_last_run“,use_column_value => false,tracking_column_type =>”数字“,clean_run => false,record_last_run => true,小写字母column_names => true>   错误:未加载com.mysql.jdbc.Driver。您确定在:jdbc_driver_library中包含正确的jdbc驱动程序吗?   异常:LogStash :: ConfigurationError   堆栈:C:/logstash-7.3.0/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/plugin_mixins/jdbc/jdbc.rb:163:in {{ 1}} execute_statement” C:/logstash-7.3.0/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/inputs/jdbc.rb:277:在open_jdbc_connection' C:/logstash-7.3.0/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/plugin_mixins/jdbc/jdbc.rb:221:in中运行' C:/logstash-7.3.0/logstash-core/lib/logstash/java_pipeline.rb:309:在start_input的execute_query' C:/logstash-7.3.0/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/inputs/jdbc.rb:263:in块中' [2019-11-06T13:03:31,349] [WARN] [logstash.runner] SIGINT已收到。闭嘴 [2019-11-06T13:03:32,070] [错误] [logstash.inputs.jdbc]无法加载C:/elasticsearch-7.3.0/driver/com.mysql.jdbc_5.1.5.jar {:exception =># } [2019-11-06T13:03:36,354] [WARN] [logstash.runner]收到关闭信号,但管道仍在等待进行中的事件 待处理。发送另一个^ C将强制退出Logstash,但这可能会导致数据丢失。

benbenmail 回答:在将mysql数据传输到kibana时出现logstash配置错误,sql db密码为空,因此我传递了jdbc_password =“”

检查jdbc驱动程序是否在上述路径中

   Dim json As String = TextBox1.Text
              Dim ser As JObject = JObject.Parse(json)
                Dim data As List(Of JToken) = ser.Children().ToList

                For Each item As JProperty In data
                    item.CreateReader()
                    Select Case item.Name

                        Case "push"
                            For Each msg As JObject In item
        Dim tyep As String = msg("type")
                                Dim source As String = msg("source_device_iden")

                            Next
                    End Select


                Next
本文链接:https://www.f2er.com/3157515.html

大家都在问