Skip to content

Instantly share code, notes, and snippets.

@OsamaMahmood
Created July 4, 2020 13:02
Show Gist options
  • Save OsamaMahmood/c86140b0f8ea086e85224e3412f315bc to your computer and use it in GitHub Desktop.
Save OsamaMahmood/c86140b0f8ea086e85224e3412f315bc to your computer and use it in GitHub Desktop.
input {
jdbc {
clean_run => true
jdbc_driver_library => "/root/jdbc.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/jobschema"
jdbc_user => "root"
jdbc_pass => ""
schedule => "* * * * *"
statement => "select jobid, jobname, executiontime, jobstatus from jobdata where jobid > :sql_last_value"
use_column_value => true
tracking_column => "jobid"
}
}
output{
elasticsearch {
hosts => ["localhost:9200"]
index => "jobdata"
}
stdout {
codec => rubydebug
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment