- baixe https://dbschema.com/jdbc-drivers/MongoDbJdbcDriver.zip
- descompacte e copie todos os arquivos para o caminho (~/logstash-7.4.2/logstash-core/lib/jars/)
- modifique o arquivo de configuração (mongo-logstash.conf) abaixo:
- executar:~/logstash-7.4.2/bin/logstash -f mongo-logstash.conf
- sucesso, tente!
ps:esta é minha primeira resposta no stackoverflow :-)
input {
jdbc{
# NOT THIS # jdbc_driver_class => "Java::mongodb.jdbc.MongoDriver"
jdbc_driver_class => "com.dbschema.MongoJdbcDriver"
jdbc_driver_library => "mongojdbc1.5.jar"
jdbc_user => "" #no user and pwd
jdbc_password => ""
jdbc_connection_string => "jdbc:mongodb://127.0.0.1:27017/db1"
statement => "db.t1.find()"
}
}
output {
#stdout { codec => dots }
stdout { }
}