yandextank/plugins/Telegraf/client.py
def start(self):
        """Start remote agent"""
        logger.info('Starting agent: %s', self.host)
        command = "{python} {agent_path} --telegraf {telegraf_path} --host {host} {kill_old}".format(
            python=self.python,
            agent_path=os.path.join(
                self.path['AGENT_REMOTE_FOLDER'],
                self.AGENT_FILENAME),
            telegraf_path=self.path['TELEGRAF_REMOTE_PATH'],
            host=self.host,
            kill_old=self.kill_old)
        logger.debug('Command to start agent: %s', command)
        self.session = self.ssh.async_session(command)
        self.reader_thread = threading.Thread(target=self.read_buffer)
        self.reader_thread.setDaemon(True)
        return self.session
def start(self):
        """Start remote agent"""
        logger.info('Starting agent: %s', self.host)
        command = "{python} {agent_path} --telegraf {telegraf_path} --host {host} {kill_old}".format(
            python=self.python,
            agent_path=os.path.join(
                self.path['AGENT_REMOTE_FOLDER'],
                self.AGENT_FILENAME),
            telegraf_path=self.path['TELEGRAF_REMOTE_PATH'],
            host=self.host,
            kill_old=self.kill_old)
        logger.debug('Command to start agent: %s', command)
        self.session = self.ssh.async_session(command)
        self.reader_thread = threading.Thread(target=self.read_buffer)
        self.reader_thread.setDaemon(True)
        return self.session
def start ( self ) : logger . info ( 'Starting agent: %s' , self . host ) command = "{python} {agent_path} --telegraf {telegraf_path} --host {host} {kill_old}" . format ( python = self . python , agent_path = os . path . join ( self . path [ 'AGENT_REMOTE_FOLDER' ] , self . AGENT_FILENAME ) , telegraf_path = self . path [ 'TELEGRAF_REMOTE_PATH' ] , host = self . host , kill_old = self . kill_old ) logger . debug ( 'Command to start agent: %s' , command ) self . session = self . ssh . async_session ( command ) self . reader_thread = threading . Thread ( target = self . read_buffer ) self . reader_thread . setDaemon ( True ) return self . session
Start remote agent
Start remote agent