def prepare(self):
<EOL>agent_configs = []<EOL>if self.config:<EOL><INDENT>agent_configs = self.config_manager.getconfig(<EOL>self.config, self.default_target)<EOL><DEDENT>for config in agent_configs:<EOL><INDENT>if config['<STR_LIT:host>'] in ['<STR_LIT:localhost>', '<STR_LIT:127.0.0.1>', '<STR_LIT>']:<EOL><INDENT>client = self.clients['<STR_LIT:localhost>'](<EOL>config, self.old_style_configs, kill_old=self.kill_old)<EOL><DEDENT>else:<EOL><INDENT>client = self.clients['<STR_LIT>'](<EOL>config, self.old_style_configs, timeout=<NUM_LIT:5>, kill_old=self.kill_old)<EOL><DEDENT>logger.debug('<STR_LIT>', client.host)<EOL>agent_config, startup_config, customs_script = client.install()<EOL>if agent_config:<EOL><INDENT>self.agents.append(client)<EOL>self.artifact_files.append(agent_config)<EOL><DEDENT>if startup_config:<EOL><INDENT>self.artifact_files.append(startup_config)<EOL><DEDENT>if customs_script:<EOL><INDENT>self.artifact_files.append(customs_script)<EOL><DEDENT><DEDENT>
Prepare for monitoring - install agents etc