Logstash jdbc input for multiple queries

Got 5+ queries that i need to run every X minutes so instead of creating multiple inputs i was thinking of using statement_filepath to read all of them but seems like it doesn't quite accept wildcards (/my/queries/path/*.sql) . Is there any workaround?

1 Like

Not that I am aware of.
Multiple input pipelines might be your best option OR rewriting your SQL query so that you get all of the data back in a single statement.

yeah thats what we were thinking.... having all of the data we need into a single table and pull it from there.
would be fantastic if the jdbc plugin would do multiple files.

anyway, thanks!!

Could you create a view in your database and just query that?
That way you are not relying on logstash for a long query, you can manipulate the view on the database backend.

I can't as im only pulling but ive already requested the DBA teams to either give me 1 huge query or create a view/table to host all of the data we need to pull.

thanks!

1 Like

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