Do I need to run in background logstash process for schedule jdbc input plugin?

Hi everybody

I am trying to run logstash conf file through Jenkins, I am using a jdbc input plugin with a schedule property to run each morning at 6.00 AM and I have a question, Do I need to leave the process run in background (/logstash -f ) to execute the query every morning?.

When the job in jenkins is executed with the schedule property this doesn't finish and I don't know why, but when I remove the schedule property the jobs finish without problem.

Somebody can explain me how the schedule property works ?

If you use Logstash's schedule option it'll run forever and periodically fetch from the database. That's not suitable for executable via Jenkins. So, either use Jenkins's schedule feature and run Logstash without its schedule feature, or run Logstash outside of Jenkins and rely on Logstash's schedule feature.

Thanks for your answer,

I solve this calling sh command in background with Jenkins some like this.

sh "/opt/logstash/bin/logstash --allow-env -f ${workspace}/src/middleware-logstash.conf &"

And thats works for me because I needed Jenkins for do others activities :smiley:

What's the point of starting it from Jenkins and running it in the background?

The main point is that we implement a java process to export and import kibana dashboards, visualizations and search to JSON files and we can move this to some environments (dev, pre and pro).

when Jenkins runs extract these dashboards and export to required environment and one activity is recycle the process of logstash to execute.

And this is the Kibana project for migrate dashboards