Open lorecoro opened 6 years ago
Solution:
diff --git a/lib/logstash/inputs/mongodb.rb b/lib/logstash/inputs/mongodb.rb
index 16b85ab..a1b021d 100644
--- a/lib/logstash/inputs/mongodb.rb
+++ b/lib/logstash/inputs/mongodb.rb
@@ -302,6 +302,8 @@ class LogStash::Inputs::MongoDB < LogStash::Inputs::Base
else
event.set(k.to_s, v)
end
+ elsif v.is_a?(TrueClass) || v.is_a?(FalseClass)
+ event.set(k.to_s,v.to_s)
else
if k.to_s == "_id" || k.to_s == "tags"
event.set(k.to_s, v.to_s )
At the moment boolean fields in mongo are discarded and don't reach the filter phase.