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

**URL:** <https://discuss.elastic.co/t/when-i-use-input-jdbc-and-output-webhdfs-to-do-something-occur-host-message/133243>\
**Category:** Logstash\
**Created:** [May 25, 2018, 3:46am UTC](https://discuss.elastic.co/t/when-i-use-input-jdbc-and-output-webhdfs-to-do-something-occur-host-message/133243 "2018-05-25T03:46:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hfq-jingsi](https://avatars.discourse-cdn.com/v4/letter/h/9fc348/32.png) [@hfq-jingsi](https://discuss.elastic.co/u/hfq-jingsi)\
**Post date:** [May 25, 2018, 3:46am UTC](https://discuss.elastic.co/t/when-i-use-input-jdbc-and-output-webhdfs-to-do-something-occur-host-message/133243/1 "2018-05-25T03:46:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hfq-jingsi](https://avatars.discourse-cdn.com/v4/letter/h/9fc348/32.png) [@hfq-jingsi](https://discuss.elastic.co/u/hfq-jingsi)\
**Post date:** [May 25, 2018, 3:50am UTC](https://discuss.elastic.co/t/when-i-use-input-jdbc-and-output-webhdfs-to-do-something-occur-host-message/133243/3 "2018-05-25T03:50:56Z")

</div>

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}

---

<div class="post-metadata">

**Author:** ![hfq-jingsi](https://avatars.discourse-cdn.com/v4/letter/h/9fc348/32.png) [@hfq-jingsi](https://discuss.elastic.co/u/hfq-jingsi)\
**Post date:** [May 25, 2018, 3:52am UTC](https://discuss.elastic.co/t/when-i-use-input-jdbc-and-output-webhdfs-to-do-something-occur-host-message/133243/4 "2018-05-25T03:52:54Z")

</div>

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

```

}

---

<div class="post-metadata">

**Author:** ![hfq-jingsi](https://avatars.discourse-cdn.com/v4/letter/h/9fc348/32.png) [@hfq-jingsi](https://discuss.elastic.co/u/hfq-jingsi)\
**Post date:** [May 25, 2018, 6:18am UTC](https://discuss.elastic.co/t/when-i-use-input-jdbc-and-output-webhdfs-to-do-something-occur-host-message/133243/5 "2018-05-25T06:18:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 22, 2018, 6:19am UTC](https://discuss.elastic.co/t/when-i-use-input-jdbc-and-output-webhdfs-to-do-something-occur-host-message/133243/6 "2018-06-22T06:19:01Z")

</div>

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