利用logstash收集mysql数据库表中的数据,logstash支持jdbc插件,可以用来采集数据库中的数据。
jdbc插件官方手册参考:https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html
logstash具体配置示例:
input{
jdbc{
jdbc_driver_library => "/data/jdbc/mysql-connector-java-5.1.49.jar" # mysql驱动存放路径
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string =>