Like this output configuration, just want to send id
to mongodb
output {
mongodb {
uri => 'mongodb://localhost'
database => "testDB"
collection => 'testCollection'
codec => line { format => "%{id}"}
}
}
But after ran it, every data had been saved into mongodb include id
.
With Redis, it can work:
output {
redis {
host => ["127.0.0.1:6379"]
data_type => "list"
key => "ID"
codec => line { format => "%{id}"}
}
}
How to do with mongo if don't set a filter
to reach the same result?