We need to monitor MongoDB for which i tried the https://github.com/omni-lchen/zabbix-mongodb project, however, I am only getting the number of process in the zabbix.............Kindly help if anyone of you guys have done this before.
image
root@ip-172-31-13-41:/usr/local/bin# ./mongodb-stats.sh
Traceback (most recent call last):
File "/usr/local/bin/zabbix-mongodb.py", line 208, in
MongoDB.getOplog()
File "/usr/local/bin/zabbix-mongodb.py", line 85, in getOplog
db.authenticate(self.mongo_user, self.mongo_password)
File "/usr/local/lib/python2.7/dist-packages/pymongo/database.py", line 1241, in call
self.__name, self.__client.class.name))
TypeError: 'Database' object is not callable. If you meant to call the 'authenticate' method on a 'MongoClient' object it is failing because no such method exists.
1
Environment Details:
OS: ubuntu 16.04
Mongo Version : 3.2
Zabbix agent version 3.4
zabbix-mongodb.py configuration:
class MongoDB(object):
def init(self):
self.mongo_host = "127.0.0.1"
self.mongo_port = 27017
self.mongo_db = ["admin", ]
self.mongo_user = "admin"
self.mongo_password = "admin123"
self.__conn = None
self.__dbnames = None
self.__metrics = []
image
root@ip-172-31-13-41:/usr/local/bin# ./mongodb-stats.sh
Traceback (most recent call last):
File "/usr/local/bin/zabbix-mongodb.py", line 208, in
MongoDB.getOplog()
File "/usr/local/bin/zabbix-mongodb.py", line 85, in getOplog
db.authenticate(self.mongo_user, self.mongo_password)
File "/usr/local/lib/python2.7/dist-packages/pymongo/database.py", line 1241, in call
self.__name, self.__client.class.name))
TypeError: 'Database' object is not callable. If you meant to call the 'authenticate' method on a 'MongoClient' object it is failing because no such method exists.
1
Environment Details:
OS: ubuntu 16.04
Mongo Version : 3.2
Zabbix agent version 3.4
zabbix-mongodb.py configuration:
class MongoDB(object):
def init(self):
self.mongo_host = "127.0.0.1"
self.mongo_port = 27017
self.mongo_db = ["admin", ]
self.mongo_user = "admin"
self.mongo_password = "admin123"
self.__conn = None
self.__dbnames = None
self.__metrics = []
Comment