From 56c798a761bdfcb9775a9d5118924f1bc3c41f74 Mon Sep 17 00:00:00 2001 From: Andres Carmelo Micalizzi Casali Date: Wed, 21 Feb 2024 17:36:49 +0100 Subject: [PATCH] fix query typo --- .../wazuh_testing/wazuh_testing/tools/performance/statistic.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deps/wazuh_testing/wazuh_testing/tools/performance/statistic.py b/deps/wazuh_testing/wazuh_testing/tools/performance/statistic.py index 666adf0c45..4813163f22 100644 --- a/deps/wazuh_testing/wazuh_testing/tools/performance/statistic.py +++ b/deps/wazuh_testing/wazuh_testing/tools/performance/statistic.py @@ -146,7 +146,7 @@ def _parse_api_data(self): """Read the data from the statistics file generated by Wazuh API.""" API_URL = f"https://{self.ip}:{self.port}" - DAEMONS_ENDPOINT= f"/manager/daemons/stats?daemons_list={self.daemon}?wait_for_complete=true" + DAEMONS_ENDPOINT= f"/manager/daemons/stats?daemons_list={self.daemon}&wait_for_complete=true" TOKEN_ENDPOINT="/security/user/authenticate" logging.info("Getting statistics data from API for {}".format(self.target)) @@ -176,7 +176,6 @@ def _parse_api_data(self): logging.error(f"Error fetching {self.daemon} datafrom API: {str(e)}") else: logging.error("Failed to fetch daemons data after 3 attempts") - data = daemons_response.json()['data']['affected_items'][0] self._write_csv(data, self.target, self.csv_file)