From 10f7e3bda1ca53ece73272639fceecc8a6630b33 Mon Sep 17 00:00:00 2001 From: Alex Ruiz Date: Fri, 15 Nov 2024 12:57:03 +0100 Subject: [PATCH] Fix agents events generator --- ecs/agent/event-generator/event_generator.py | 6 +++--- test-tools/.gitignore | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 test-tools/.gitignore diff --git a/ecs/agent/event-generator/event_generator.py b/ecs/agent/event-generator/event_generator.py index bc3849c4f7004..81f53bf393c5f 100644 --- a/ecs/agent/event-generator/event_generator.py +++ b/ecs/agent/event-generator/event_generator.py @@ -41,7 +41,8 @@ def generate_random_agent(): 'status': random.choice(['active', 'inactive']), 'last_login': generate_random_date(), 'groups': [f'group{random.randint(0, 99)}', f'group{random.randint(0, 99)}'], - 'key': f'key{random.randint(0, 999)}' + 'key': f'key{random.randint(0, 999)}', + 'host': generate_random_host() } return agent @@ -125,8 +126,7 @@ def generate_random_data(number): data = [] for _ in range(number): event_data = { - 'agent': generate_random_agent(), - 'host': generate_random_host(), + 'agent': generate_random_agent() } data.append(event_data) return data diff --git a/test-tools/.gitignore b/test-tools/.gitignore new file mode 100644 index 0000000000000..2fba045aa1ba5 --- /dev/null +++ b/test-tools/.gitignore @@ -0,0 +1 @@ +wazuh-certificates.tar \ No newline at end of file