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

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

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}

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"
   }

}

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

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