Esempio n. 1
0
    def __init__(self, base_path):
        storage.__init__(self)

        self.logger.debug(" + Init Files Store")
        self.base_path = base_path

        try:
            os.mkdir(self.base_path)
        except:
            pass
Esempio n. 2
0
	def __init__(self, mongo_host="127.0.0.1", mongo_port=27017, mongo_db='canopsis', mongo_collection='perfdata', mongo_safe=False):
		storage.__init__(self)
		self.logger.debug(" + Init MongoDB Store")

		self.mongo_host = mongo_host
		self.mongo_port = mongo_port
		self.mongo_db = mongo_db
		self.mongo_collection = mongo_collection
		self.mongo_safe = mongo_safe

		self.logger.debug(" + Connect to MongoDB (%s/%s@%s:%s)" % (mongo_db, mongo_collection, mongo_host, mongo_port))
		self.conn=Connection(self.mongo_host, self.mongo_port)
		self.db=self.conn[self.mongo_db]
		self.collection = self.db[self.mongo_collection]

		self.grid = GridFS(self.db, self.mongo_collection+".fs")
Esempio n. 3
0
    def __init__(self):
        storage.__init__(self)
        self.logger.debug(" + Init Mem Store")

        self.data = {}