# Failure mechanism in logstash

**URL:** <https://discuss.elastic.co/t/failure-mechanism-in-logstash/213733>\
**Category:** Logstash\
**Created:** [January 3, 2020, 5:35pm UTC](https://discuss.elastic.co/t/failure-mechanism-in-logstash/213733 "2020-01-03T17:35:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pramod\_Thakur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pramod_thakur/32/48428_2.png) [@Pramod\_Thakur](https://discuss.elastic.co/u/Pramod_Thakur)\
**Post date:** [January 3, 2020, 5:35pm UTC](https://discuss.elastic.co/t/failure-mechanism-in-logstash/213733/1 "2020-01-03T17:35:55Z")

</div>

Hi Folks,

I am trying to push data from oracle to ES or rabbitmq and I am able to do that as well. My problem when I am pushing those data and that time my ES or rabbitmq goes down then I am not able to figure out that from where I need to push that data because my last\_run\_metadata file also gets updated.

```
input {
jdbc{
 jdbc_validate_connection => true
 jdbc_driver_library => ""
 jdbc_driver_class => "Java::oracle.jdbc.OracleDriver"
 jdbc_connection_string => "myconnectionstring"
 jdbc_user => "username"
 jdbc_password => "password"
 statement => "SELECT * FROM auto_increment_tb where id>:sql_last_value"
 use_column_value=>true
 tracking_column=>id
 schedule => "* * * * * *"
 last_run_metadata_path => "C:\Pramod\rnd\ElasticSearch\logstash-7.2.0\.logstash_jdbc_last_run"
}

```

}  
output {  
elasticsearch {  
hosts =\> ["[http://localhost:9200](http://localhost:9200)"]  
index =\> "auto\_increment\_tb"  
}  
stdout{  
codec =\> rubydebug  
}  
}

I just want that is there any method or something so that I can update my last\_run\_metadata file on a conditional basis or is there any better solution?

Pls help.

---

<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:** [January 31, 2020, 5:35pm UTC](https://discuss.elastic.co/t/failure-mechanism-in-logstash/213733/2 "2020-01-31T17:35:55Z")

</div>

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