使用logstash出现报错com.mysql.jdbc.Driver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library

是因为需要使用到插件logstash-input-jdbc,

因该插件是ruby开发的,需要先在电脑中安装ruby环境,然后安装RubyGems插件

进入logstash-input-jdbc目录下,命令行执行gem build logstash-input-jdbc.gemspec,

命令执行完后会生成一个logstash-input-jdbc-xxx.gem文件,

把这个文件复制到logstash的bin目录下,命令行执行./logstash-plugin install logstash-input-jdbc-xxx.gem,安装完成后。

logstash就可以正常启动了

posted @ 2021-08-24 14:05  会飞的小虫子  阅读(872)  评论(0编辑  收藏  举报