# Logstash updating data

**URL:** <https://discuss.elastic.co/t/logstash-updating-data/65828>\
**Category:** Logstash\
**Created:** [November 11, 2016, 3:47pm UTC](https://discuss.elastic.co/t/logstash-updating-data/65828 "2016-11-11T15:47:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gnievoj](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@gnievoj](https://discuss.elastic.co/u/gnievoj)\
**Post date:** [November 11, 2016, 3:47pm UTC](https://discuss.elastic.co/t/logstash-updating-data/65828/1 "2016-11-11T15:47:40Z")

</div>

Hello, It's my logstash config file  
\> input {

> ```
> jdbc {
> jdbc_connection_string => "jdbc:mysql://localhost:3306/ejabberd"
> jdbc_user => "ejabber"
> jdbc_password => "password"
> jdbc_driver_library => "mysql-connector-java-5.1.39-bin.jar"
> jdbc_driver_class => "com.mysql.jdbc.Driver"
> statement => "SELECT * FROM ejabberd.archive"
> }
> }
> output {
> # stdout { codec => json_lines }
> elasticsearch {
> index => "messages"
> hosts => ["localhost:9200"]
> }
> }
> 
> ```

Im getting data from mysql, but when im put new record to db, elasticsearch can't see my newest records. Data are update only then im' restart logstash. How can i get live updated records from logstash? Thank you

---

<div class="post-metadata">

**Author:** ![fabian](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@fabian](https://discuss.elastic.co/u/fabian)\
**Post date:** [November 11, 2016, 5:00pm UTC](https://discuss.elastic.co/t/logstash-updating-data/65828/2 "2016-11-11T17:00:47Z")

</div>

Never used jdbc input plugin, but i think you have to use a scheduler. Here is a hint in documentation:

> There is no schedule by default. If no schedule is given, then the statement is run  
> exactly once.  
> [Jdbc input plugin | Logstash Reference [8.11] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#plugins-inputs-jdbc-schedule)

---

<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:** [December 9, 2016, 5:00pm UTC](https://discuss.elastic.co/t/logstash-updating-data/65828/3 "2016-12-09T17:00:51Z")

</div>

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