yandextank/plugins/Telegraf/config.py
def getconfig(self, filename, target_hint):
        """Prepare config data."""
        try:
            tree = self.parse_xml(filename)
        except IOError as exc:
            logger.error("Error loading config: %s", exc)
            raise RuntimeError("Can't read monitoring config %s" % filename)
        hosts = tree.findall('Host')
        config = []
        for host in hosts:
            host_config = self.get_host_config(host, target_hint)
            config.append(host_config)
        return config
def getconfig(self, filename, target_hint):
        try:
            tree = self.parse_xml(filename)
        except IOError as exc:
            logger.error("Error loading config: %s", exc)
            raise RuntimeError("Can't read monitoring config %s" % filename)
        hosts = tree.findall('Host')
        config = []
        for host in hosts:
            host_config = self.get_host_config(host, target_hint)
            config.append(host_config)
        return config
def getconfig ( self , filename , target_hint ) : try : tree = self . parse_xml ( filename ) except IOError as exc : logger . error ( "Error loading config: %s" , exc ) raise RuntimeError ( "Can't read monitoring config %s" % filename ) hosts = tree . findall ( 'Host' ) config = [ ] for host in hosts : host_config = self . get_host_config ( host , target_hint ) config . append ( host_config ) return config
Prepare config data.
Prepare config data .