I am using Logstash-7.17.4 version to index data from oracle db to Elasticsearch.
When I am running through Command Prompt, it is running but when running through Task Scheduler, logstash has stopped automatically after some time.
I have created 1 bat file and in that 2 commands are there::
cd D:\logstash-7.17.4-windows-x86_64\logstash-7.17.4\bin
logstash -f logstash-oracle.conf
I have run Logstash as a service in Task Scheduler.
My Logstash Configuration:
input {
jdbc {
clean_run => true
jdbc_driver_library => "D:\logstash-7.17.4-windows-x86_64\logstash-7.17.4\ojdbc8.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@Host:1521/service-name"
jdbc_user => "user"
jdbc_password => "user123"
schedule => "*/1 * * * * *"
statement => "SELECT * from emp"
use_column_value => true
tracking_column => "last_update_date"
tracking_column_type => "timestamp"
}
}
filter {
mutate {
remove_field => ["@version", "@timestamp"]
copy => { "id" => "esid" }
}
}
output {
elasticsearch{
hosts => ["https://domain1:9200","https://domain2:9200","https://domain3:9200"]
index => "testindex"
user => "user1"
password => "user1"
ssl => true
ssl_certificate_verification => true
cacert => 'D:\logstash-7.17.4-windows-x86_64\logstash-7.17.4\nonprodescertificate.cer'
document_id => "%{id}"
doc_as_upsert => true
}
stdout {
codec => rubydebug
}
}
could you @warkolm @sudhagar_ramesh @Badger please help me on this? This has to be deployed to PROD as well.