当我尝试使用 jdbc logstash 插件从 mysql db 获取数据时,我面临以下错误
[2019-07-10T07:34:31,806][ERROR][logstash.javapipeline ] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<TypeError: no implicit conversion of Integer into String>
下面是logstash配置文件
input{
jdbc {
jdbc_driver_library => "/usr/share/jdbc_driver/mysql-connector-java-5.1.47.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://<dbname>:3306/<tablename>"
jdbc_user => "<username>"
jdbc_password => "<password>"
statement => "select * from spt_entitlement_snapshot"
}
}
filter {
mutate {
convert => { "account_only" => "integer" }
}
}
output{
elasticsearch {
hosts => ["localhost:9200"]
index => "agco-entitlements-mysql"
document_id => "%{id}"
}
stdout {
codec => rubydebug
}
}
在为其他表格工作时,它会给一个特定表格带来问题