def build_config(self): """Build the config as a Plugins object and return.""" config = agent_config.Plugins() parameters = {'name': self.CHECK_NAME} # set service and component dimensions = _get_dimensions('block-storage', None) if len(dimensions) > 0: parameters['dimensions'] = dimensions config[self.CHECK_NAME] = {'init_config': None, 'instances': [parameters]} log.info("\tEnabling the CinderLMDetect plugin %s" % config) return config
def build_config(self): """Build the config as a Plugins object and return.""" config = agent_config.Plugins() parameters = {'name': self.CHECK_NAME} # set service and component dimensions = _get_dimensions('block-storage', None) if len(dimensions) > 0: parameters['dimensions'] = dimensions config[self.CHECK_NAME] = { 'init_config': None, 'instances': [parameters] } log.info("\tEnabling the CinderLMDetect plugin %s" % config) return config
def build_config(self): """ Build the config as a Plugins object and return. """ config = agent_config.Plugins() parameters = {'name': self.CHECK_NAME} if self.args: for arg in ('metrics_files', 'subcommands', 'suppress_ok'): if arg in self.args: parameters[arg] = self.args.get(arg) # set service and component dimensions = _get_dimensions('object-storage', None) if len(dimensions) > 0: parameters['dimensions'] = dimensions config[self.CHECK_NAME] = {'init_config': None, 'instances': [parameters]} return config