When I use input-jdbc and output webhdfs to do something occur %{host} %{message}


(Hfq Jingsi) #1

when I testing , anything is ok. But using jdbc plug-ins, the information is " %{host} %{message}" all .
Please help me .


(Hfq Jingsi) #3

2018-05-25T03:48:01.523Z %{host} %{message}
2018-05-25T03:48:01.564Z %{host} %{message}
2018-05-25T03:48:01.571Z %{host} %{message}
2018-05-25T03:48:01.577Z %{host} %{message}
2018-05-25T03:48:01.581Z %{host} %{message}
2018-05-25T03:48:01.496Z %{host} %{message}
2018-05-25T03:48:01.524Z %{host} %{message}
2018-05-25T03:48:01.566Z %{host} %{message}


(Hfq Jingsi) #4

This is configuration file

input {
jdbc {
jdbc_connection_string => "jdbc:mysql://:3306/?zeroDateTimeBehavior=convertToNull"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_user => "~~"
jdbc_password => "**"
jdbc_driver_library => "/export/packs/mysql-connector-java-5.1.44-bin.jar"
jdbc_paging_enabled => "true"
jdbc_page_size => "5000"
schedule => "
* * * *"
statement => "SELECT * FROM agency limit 20"
codec => plain{ charset => "UTF-8" }
}
}

output {

webhdfs{
        host => "***"
        port => 50070
        path => "/***/snapshout/dt=%{+YYYY-MM-dd-HH}.txt"
        user => "hue"
        compression => "none"
    }
stdout {
   codec => "rubydebug"
   }

}


(Hfq Jingsi) #5

end I add the "codec => "json" in my output plug, it`s ok


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.