Thanks for your reply, I got it to work by placing two consecutive jdbc classes in the same input block, as seen below. The issue was with one of my SQL statements, although I'm unsure what the issue with the SQL was, as it executes fine from SSMS.
input {
jdbc {
jdbc_driver_library => "/usr/local/sbin/sqljdbc_6.0/enu/sqljdbc42.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://msSQLServer:1433;user=SQLUser;password=SQLUser!;"
jdbc_user => "SQLUser"
jdbc_password => "SQLUser!"
statement => "SELECT [Time_Stamp]
,other-fields
FROM [SQLDB].[dbo].[SQLTable]"
schedule => "* * * * *"
type => "CustomType"
add_field => { "SQLDescription" => "SQLDesc1" }
sql_log_level => "debug"
}
jdbc {
jdbc_driver_library => "/usr/local/sbin/sqljdbc_6.0/enu/sqljdbc42.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://msSQLServer:1433;user=SQLUser;password=SQLUser!;"
jdbc_user => "SQLUser"
jdbc_password => "SQLUser!"
statement => "SELECT [Time_Stamp]
,other-fields
FROM [SQLDB].[dbo].[SQLTable2]"
schedule => "* * * * *"
type => "CustomType"
add_field => { "SQLDescription" => "SQLDesc2" }
schedule => "*\10 * * * *"
}
}
Additionally, thanks to @jcome, I found that the input-jdbc configuration specifies the last run time;
"# Path to file with last run time
config :last_run_metadata_path, :validate => :string, :default => "#{ENV['HOME']}/.logstash_jdbc_last_run"