Skip to content

Commit

Permalink
fix query typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Deblintrake09 committed Feb 21, 2024
1 parent edac452 commit 56c798a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 56c798a

Please sign in to comment.