I recently migrated from mongodb 3.0 to mongodb 6.0 and logstash plugin 3.1.5 was no longer working, I upgraded the plugin to 3.1.7 and I keep getting this error in logstash logs:
n] MONGODB | Error checking 127.0.0.1:27017: ArgumentError: wrong number of arguments (given 2, expected 1)
n] MONGODB | Failed to handshake with 127.0.0.1:27017: ArgumentError: wrong number of arguments (given 2, expected 1)
n] MONGODB | Error checking 127.0.0.1:27017: ArgumentError: wrong number of arguments (given 2, expected 1)
n] MONGODB | Failed to handshake with 127.0.0.1:27017: ArgumentError: wrong number of arguments (given 2, expected 1)
n] MONGODB | Error checking 127.0.0.1:27017: ArgumentError: wrong number of arguments (given 2, expected 1)
Here's my logstash configuration:
input {
file {
path => "/home/shaigaut/logstash.log"
type => "log"
}
}
output {
mongodb {
collection => "testplugin"
database => "iris"
uri => "mongodb://127.0.0.1:27017"
codec => json { }
}
}
I've been reading about this error and it seems like a bug, would love to know if there is any workaround possible to connect logstash output to mongoDB