2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Fix for pymongo > 3.0 and connection support of MongoClient only

https://api.mongodb.com/python/current/changelog.html#mongoclient-changes
This commit is contained in:
Nicolas Casar Gonzalez 2016-06-14 15:23:56 -03:00
parent d42751c908
commit d1ca98563b

View File

@ -25,7 +25,7 @@ import pymongo
def _get_members():
host = os.environ.get('host', '127.0.0.1')
port = os.environ.get('port', 27017)
conn = pymongo.Connection(host,port)
conn = pymongo.MongoClient(host,port)
repl_status = conn.admin.command("replSetGetStatus")
members = {}