Пример #1
0
    def __init__(self, logger):
        self.logger = logger

        self.db_store = MongoStore.get_default()
        self.cache_store = RedisStore.get_default()
        self.amqp_url, self.amqp_exchange = AmqpConnection.parse_conf()
        self.ts_client = InfluxDBClient.from_configuration(self.logger)
Пример #2
0
    def __init__(self, logger):
        self.logger = logger

        self.db_store = MongoStore.get_default()
        self.cache_store = RedisStore.get_default()
        self.amqp_url, self.amqp_exchange = AmqpConnection.parse_conf()
        self.ts_client = InfluxDBClient.from_configuration(self.logger)
Пример #3
0
    def setUpClass(cls):
        cls.amqp_url, cls.amqp_exname = AmqpConnection.parse_conf()

        cls.event = {
            'connector': 'test_amqp',
            'connector_name': 'test_amqp',
            'source_type': 'resource',
            'event_type': 'check',
            'component': 'test',
            'resource': 'test'
        }
Пример #4
0
    def setUpClass(cls):
        cls.amqp_url, cls.amqp_exname = AmqpConnection.parse_conf()

        cls.event = {
            'connector': 'test_amqp',
            'connector_name': 'test_amqp',
            'source_type': 'resource',
            'event_type': 'check',
            'component': 'test',
            'resource': 'test'
        }
Пример #5
0
    def __init__(self, logger):
        self.logger = logger

        self.db_store = MongoStore.get_default()
        self.cache_store = RedisStore.get_default()
        self.amqp_url, self.amqp_exchange = AmqpConnection.parse_conf()
        self.ts_client = InfluxDBClient.from_configuration(self.logger)

        parser = Configuration.load(CONF_PATH, Ini)
        section = parser.get(ConfName.SECT_HC)

        self.check_amqp_limit_size = int(
            section.get(ConfName.CHECK_AMQP_LIMIT_SIZE, ""))
        self.check_amqp_queues = section.get(ConfName.CHECK_AMQP_QUEUES,
                                             "").split(",")
        self.check_collections = section.get(ConfName.CHECK_COLLECTIONS,
                                             "").split(",")
        self.check_engines_list = section.get(ConfName.CHECK_ENGINES,
                                              "").split(",")
        self.check_ts_db = section.get(ConfName.CHECK_TS_DB, "")
        self.check_webserver = section.get(ConfName.CHECK_WEBSERVER, "")
        self.systemctl_engine_prefix = section.get(
            ConfName.SYSTEMCTL_ENGINE_PREFIX, "")