Data is not update using schedule


(Sumit Gupta) #1

I'm using Following command. This is not updating Data as schedule .

It is my Script:

input {
    jdbc {
        jdbc_driver_library => "/app/logstash-5.6.2/lib/ojdbc7.jar"
        jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
        jdbc_connection_string => "jdbc:oracle:thin:@localhost:1521/apextst"
        jdbc_user => "*****"
        jdbc_password => "****"
        jdbc_fetch_size => 3000
        schedule => "* * * * *"
        statement => "select * from dba_data_files"
       }
}
output   {
    stdout { codec => rubydebug }
        elasticsearch {
                hosts => ["localhost:9200"]
                index => "logstash-databases-info"
                document_type => "mytype1"
                document_id => "%{file_id}"
        }
}

Can you please check?


(David Pilato) #2

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:

```
CODE
```

I edited your post.

I moved your question to #logstash


(Magnus Bäck) #3

This is not updating Data as schedule .

So what does happen? What does your stdout output produce?


(Sumit Gupta) #4

This is not update data as schedule. This giving old data. As scheduled this should be run on the interval one second.


(Magnus Bäck) #5

As scheduled this should be run on the interval one second.

No, "* * * * *" means every minute.


(Sumit Gupta) #6

Ok, But this is not updated in every minute.

Should be delete any last_run_metadata_path file?

I'm not finding any such type file.


(Sumit Gupta) #7

Ok, This is running in the interval using following script

./logstash -f /app/logstash-5.6.2/logstash-ora1.conf

If i skip by CTR+C, then schedule is stopping. How can i run this script regular interval.


(Magnus Bäck) #8

Ok, But this is not updated in every minute.

What does your stdout output produce?

Should be delete any last_run_metadata_path file?

Yes, or set the jdbc input's clean_run option.


(Sumit Gupta) #9

Thanks for reply but i'm not finding last_run_metadata_path file?

Can you help me how to find this file?


(Magnus Bäck) #10

The docs indicate that the last run data is stored in $HOME/.logstash_jdbc_last_run.


(system) closed #11

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