[root@mongo_4 bin]# python mongodb_monitor.py
Traceback (most recent call last):
File "mongodb_monitor.py", line 91, in
mongodb_dict = mongodb_monitor.get_mongo_monitor_data(conn)
File "/data/mongomon/bin/mongodb_server.py", line 41, in get_mongo_monitor_data
mongo_role = self.get_mongo_role(conn)
File "/data/mongomon/bin/mongodb_server.py", line 33, in get_mongo_role
elif ("chunks" in conn.get_database("config").collection_names()): # Role is a config servers? not mongos and has config.chunks collections. it's a config server.
File "/usr/lib64/python2.6/site-packages/pymongo/database.py", line 797, in call
self.name, self.connection.class.name))
TypeError: 'Database' object is not callable. If you meant to call the 'get_database' method on a 'MongoClient' object it is failing because no such method exists.
请教下,正在测试falcon 对mongodb监控,刚刚部署好独立实例mongodb和 monitor,运行会报这个,请问下是什么问题?
[root@mongo_4 bin]# python mongodb_monitor.py Traceback (most recent call last): File "mongodb_monitor.py", line 91, in
mongodb_dict = mongodb_monitor.get_mongo_monitor_data(conn)
File "/data/mongomon/bin/mongodb_server.py", line 41, in get_mongo_monitor_data
mongo_role = self.get_mongo_role(conn)
File "/data/mongomon/bin/mongodb_server.py", line 33, in get_mongo_role
elif ("chunks" in conn.get_database("config").collection_names()): # Role is a config servers? not mongos and has config.chunks collections. it's a config server.
File "/usr/lib64/python2.6/site-packages/pymongo/database.py", line 797, in call
self.name, self.connection.class.name))
TypeError: 'Database' object is not callable. If you meant to call the 'get_database' method on a 'MongoClient' object it is failing because no such method exists.