Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bablukpik/4b860fb5630f88321c4dd2e9d997ed99 to your computer and use it in GitHub Desktop.
Save bablukpik/4b860fb5630f88321c4dd2e9d997ed99 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