We have a stored procedure which returns data for the last hour when called without any parameters. We scheduled the JDBC input plugin to run every hour and it works well. Questions is, if I want to ingest older data I can give a specific date/time to the stored procedure, but what's the best way to do that 300 times?
I can keep updating config file and restarting logstash, but this would be a pain to automate. Has anyone figured out a better way to take care of similar issue?
I don't see a clean way of doing that. Apart from updating the config file and restarting Logstash you could store the timestamp in an environment variable that you reference in your configuration. That might be slightly easier to automate.
I ended up updating config and restarting Logstash in a loop. Plugins like that desperately need dynamic variables. This way just feels wrong even though it works. Thanks for your help.
If you start logstash with -r then it will re-read the configuration when it changes. Saves you the huge overhead of restarting logstash for each config change.
But how would I know when the input completes? My loop simply waits for logstash to exit (after its done reading sql data), updates config and starts logstash again.
I can see how -r could be really helpful in a different situation though.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.