def test_process_metricbeat(self): """ Checks that the per proc stats are found in the output and have the expected types. """ self.render_config_template( modules=[{ "name": "system", "metricsets": ["process"], "period": "5s", "processes": ["(?i)metricbeat.test"] }]) metricbeat = self.start_beat() self.wait_until(lambda: self.output_count(lambda x: x >= 1)) metricbeat.check_kill_and_wait() output = self.read_output()[0] assert re.match("(?i)metricbeat.test(.exe)?", output["system.process.name"]) assert re.match("(?i).*metricbeat.test(.exe)? -systemTest", output["system.process.cmdline"]) assert isinstance(output["system.process.state"], basestring) assert isinstance(output["system.process.cpu.start_time"], basestring) self.check_username(output["system.process.username"])
def test_process_metricbeat(self): """ Checks that the per proc stats are found in the output and have the expected types. """ self.render_config_template(modules=[{ "name": "system", "metricsets": ["process"], "period": "5s", "processes": ["(?i)metricbeat.test"] }]) metricbeat = self.start_beat() self.wait_until(lambda: self.output_count(lambda x: x >= 1)) metricbeat.check_kill_and_wait() output = self.read_output()[0] assert re.match("(?i)metricbeat.test(.exe)?", output["system.process.name"]) assert re.match("(?i).*metricbeat.test(.exe)? -systemTest", output["system.process.cmdline"]) assert isinstance(output["system.process.state"], basestring) assert isinstance(output["system.process.cpu.start_time"], basestring) self.check_username(output["system.process.username"])