Logstash.inputs.mongodb, fail <BSON::ObjectId::Invalid: '1' is an invalid ObjectId.>

HI everybody,

i am using logstash-input-mongodb, and i have the following mistake,

[logstash.inputs.mongodb ] MongoDB Input threw an exception, restarting {:exception=>#<BSON::ObjectId::Invalid: '1' is an invalid ObjectId.>}

Please can anybody help me.

thanks in advance
best regards

There are a few options.
You would need to check if the ID is a valid one.
See this question:

You could also remove and add this ID again using db.collection.remove({"_id":"yourInvalidId"}).

Let me know if this helped :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.