Logstash : run at periodical interval

I would like to launch my logstash task at periodical interval:

Do you know if there is a way and if i should add some stuffs to my conf file bellow ?

input {
    jdbc {
		jdbc_connection_string => "jdbc:sqlserver://*.*.*.*;databaseName=my_database;"
          jdbc_user => "user"
		  jdbc_password => "my_password"
        jdbc_driver_library => "C:\Program Files (x86)\sqljdbc_6.0\enu\sqljdbc42.jar"
        jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
        statement => "	select t.*from table t where t.timestamp >= sysdate - 5/(24*60) "
    }
}

filter
{
	 ruby {
			code => "event.set('[@metadata][epoch]', event.get('date_launch').getTime)"
		}
		date {
			match => ["[@metadata][epoch]", "UNIX_MS"]
			target => "date_launch"
		}
}

output {

           elasticsearch { 
		   hosts => "localhost:9200"
		   index => "my_index"
		   document_type => "my_type"	
		}
}

i did not see schedule param in jdbc plugin.

It is a solution for my case , but i am still curious to know in all cases

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