BrightcoveOS / Diamond

1.18k stars 384 forks source link

MongoDBCollector Broken starting from pymongo 3.0 #816

Closed iliapolo closed 7 years ago

iliapolo commented 9 years ago

The MongoDBCollector makes use of the 'Connection' attribute in the pymongo module:

https://github.com/BrightcoveOS/Diamond/blob/v3.5/src/collectors/mongodb/mongodb.py#L152 https://github.com/BrightcoveOS/Diamond/blob/v3.5/src/collectors/mongodb/mongodb.py#L159

This attribute has been removed from module as of version 3.0 of the pymongo library:

https://github.com/mongodb/mongo-python-driver/commit/e08aa1f90d0c64177abe9d1bcf0e0658bf0a3189#diff-f8c0b2c357efcb7a6d94aeb9e485c7f5

Collector should be adjusted to work with the latest pymongo version or the documentation of the collector should be changed to specify a specific version of pymongo. I tested with pymongo 2.8 and it worked.

gfegit commented 7 years ago

Faced the same issue.

kormoc commented 7 years ago

The repo has been moved to https://github.com/python-diamond/Diamond . Please check there to see if the issue is still present.