You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you please send the detailed instruction how to implement script to specific connection and if there multimple mongod services.
Shoul I create the config file for each service?
And how should i connect via ssl connections?
./zabbix-mongodb.py
Traceback (most recent call last):
File "./zabbix-mongodb.py", line 243, in
mongodb.get_db_names()
File "./zabbix-mongodb.py", line 73, in get_db_names
master = db_handler.command('isMaster')['ismaster']
File "/usr/lib64/python2.7/site-packages/pymongo/database.py", line 730, in command
read_preference, session) as (sock_info, slave_ok):
File "/usr/lib64/python2.7/contextlib.py", line 17, in enter
return self.gen.next()
File "/usr/lib64/python2.7/site-packages/pymongo/mongo_client.py", line 1299, in _socket_for_reads
server = self._select_server(read_preference, session)
File "/usr/lib64/python2.7/site-packages/pymongo/mongo_client.py", line 1254, in _select_server
server = topology.select_server(server_selector)
File "/usr/lib64/python2.7/site-packages/pymongo/topology.py", line 231, in select_server
address))
File "/usr/lib64/python2.7/site-packages/pymongo/topology.py", line 189, in select_servers
selector, server_timeout, address)
File "/usr/lib64/python2.7/site-packages/pymongo/topology.py", line 205, in _select_servers_loop
self._error_message(selector))
pymongo.errors.ServerSelectionTimeoutError: connection closed
Thank You
The text was updated successfully, but these errors were encountered:
Hello
Could you please send the detailed instruction how to implement script to specific connection and if there multimple mongod services.
Shoul I create the config file for each service?
And how should i connect via ssl connections?
Here is configs:
class MongoDB(object):
"""main script class"""
# pylint: disable=too-many-instance-attributes
def init(self):
self.mongo_host = "10.9.69.35"
self.mongo_port = 11166
self.mongo_db = ["admin", ]
self.mongo_user = "zabbix_2"
self.mongo_password = "zabbix_2"
self.__conn = None
self.__dbnames = None
self.__metrics = []
And here is the erros
./zabbix-mongodb.py
Traceback (most recent call last):
File "./zabbix-mongodb.py", line 243, in
mongodb.get_db_names()
File "./zabbix-mongodb.py", line 73, in get_db_names
master = db_handler.command('isMaster')['ismaster']
File "/usr/lib64/python2.7/site-packages/pymongo/database.py", line 730, in command
read_preference, session) as (sock_info, slave_ok):
File "/usr/lib64/python2.7/contextlib.py", line 17, in enter
return self.gen.next()
File "/usr/lib64/python2.7/site-packages/pymongo/mongo_client.py", line 1299, in _socket_for_reads
server = self._select_server(read_preference, session)
File "/usr/lib64/python2.7/site-packages/pymongo/mongo_client.py", line 1254, in _select_server
server = topology.select_server(server_selector)
File "/usr/lib64/python2.7/site-packages/pymongo/topology.py", line 231, in select_server
address))
File "/usr/lib64/python2.7/site-packages/pymongo/topology.py", line 189, in select_servers
selector, server_timeout, address)
File "/usr/lib64/python2.7/site-packages/pymongo/topology.py", line 205, in _select_servers_loop
self._error_message(selector))
pymongo.errors.ServerSelectionTimeoutError: connection closed
Thank You
The text was updated successfully, but these errors were encountered: