Forked from OsamaMahmood/LogstashConfig for Mysql.conf
Created
March 10, 2021 19:17
-
-
Save bablukpik/4b860fb5630f88321c4dd2e9d997ed99 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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