From 4212dfad9c21ccbd7185adeb761359e50fa91ee9 Mon Sep 17 00:00:00 2001 From: ruflin Date: Wed, 25 Jul 2018 09:29:11 +0200 Subject: [PATCH] Remove fields collector script as not needed anymore This was replace by the Golang fields collection script. --- metricbeat/scripts/fields_collector.py | 54 -------------------------- 1 file changed, 54 deletions(-) delete mode 100644 metricbeat/scripts/fields_collector.py diff --git a/metricbeat/scripts/fields_collector.py b/metricbeat/scripts/fields_collector.py deleted file mode 100644 index 0b68e428931c..000000000000 --- a/metricbeat/scripts/fields_collector.py +++ /dev/null @@ -1,54 +0,0 @@ -import os - -# Collects fields for all modules and metricset - - -def collect(): - - base_dir = "module" - path = os.path.abspath("module") - - # yml file - fields_yml = "" - - # Iterate over all modules - for module in sorted(os.listdir(base_dir)): - - module_fields = path + "/" + module + "/_meta/fields.yml" - - # Only check folders where fields.yml exists - if os.path.isfile(module_fields) == False: - continue - - # Load module yaml - with open(module_fields) as f: - tmp = f.read() - fields_yml += tmp - - # Iterate over all metricsets - for metricset in sorted(os.listdir(base_dir + "/" + module)): - - metricset_fields = path + "/" + module + "/" + metricset + "/_meta/fields.yml" - - # Only check folders where fields.yml exists - if os.path.isfile(metricset_fields) == False: - continue - - # Load metricset yaml - with open(metricset_fields) as f: - # Add 4 spaces for indentation in front of each line - for line in f: - if len(line.strip()) > 0: - fields_yml += " " + " " + line - else: - fields_yml += line - - # Add newline to make sure indentation is correct - fields_yml += "\n" - - # output string so it can be concatenated - print(fields_yml) - - -if __name__ == "__main__": - collect()