diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b6f842192..1ed43e8da2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ All notable changes to this project will be documented in this file. ### Changed +- Fix wazuhdb API statistics parsing ([#5007](https://github.com/wazuh/wazuh-qa/pull/5007)) \- (Framework) +- Enhance StatisticMonitor with API support ([#4970](https://github.com/wazuh/wazuh-qa/pull/4970)) \- (Framework) - Deactivate tests and update vulnerability-detector configuration ([#4784](https://github.com/wazuh/wazuh-qa/pull/4784)) \- (Framework + Tests) - Fix body format for get_api_token ([#4797](https://github.com/wazuh/wazuh-qa/pull/4797)) \- (Framework) - Fix one_manager_agent_env pytest marker for System Tests ([#4782](https://github.com/wazuh/wazuh-qa/pull/4782)) \- (Tests) diff --git a/deps/wazuh_testing/wazuh_testing/tools/performance/statistic.py b/deps/wazuh_testing/wazuh_testing/tools/performance/statistic.py index 4813163f22..940cacb9c3 100644 --- a/deps/wazuh_testing/wazuh_testing/tools/performance/statistic.py +++ b/deps/wazuh_testing/wazuh_testing/tools/performance/statistic.py @@ -80,6 +80,8 @@ def __init__(self, target='agent', time_step=5, dst_dir=gettempdir(), use_state_ self.daemon = 'wazuh-analysisd' elif self.target == 'wazuhdb': self.daemon = 'wazuh-db' + self.use_state_file = False + logger.warning("Wazuhdb stat monitoring from State File is not supported. Will get data from API.") else: raise ValueError(f'The target {self.target} is not a valid one.') @@ -341,12 +343,12 @@ def _write_csv(self, data, target, csv_file): "{19},{20},{21},{22},{23},{24},{25},{26},{27},{28},{29},{30},{31},{32},{33},{34},{35},"+ "{36},{37},{38},{39},{40},{41},{42},{43},{44},{45},{46},{47},{48},{49},{50},{51},{52},"+ "{53},{54},{55},{56},{57},{58},{59},{60},{61},{62},{63},{64},{65},{66},{67},{68},{69},"+ - "{70},{71},{72},{73},{74},{75},{76},{77},{78},{79},{70},{71},{72},{73},{74},{75},{76},"+ - "{77},{78},{79},{80},{81},{82},{83},{84},{85},{86},{87},{88},{89},{90},{91},{92},{93},"+ - "{94},{95},{96},{97},{98},{99},{100},{101},{102},{103},{104},{105},{106},{107},{108},"+ - "{109},{110},{11},{111},{112},{113},{114},{115},{116},{117},{118},{119},{120},{121},"+ - "{122},{123},{124},{125},{126},{127},{128},{129},{130},{131},{132},{133},{134},{135},"+ - "{136},{137},{138},{139},{140},{141},{142},{143},{145},{146},{147},{148}\n").format( + "{70},{71},{72},{73},{74},{75},{76},{77},{78},{79},{80},{81},{82},{83},{84},{85},{86},"+ + "{87},{88},{89},{90},{91},{92},{93},{94},{95},{96},{97},{98},{99},{100},{101},{102},"+ + "{103},{104},{105},{106},{107},{108},{109},{110},{111},{112},{113},{114},{115},{116},"+ + "{117},{118},{119},{120},{121},{122},{123},{124},{125},{126},{127},{128},{129},{130},"+ + "{131},{132},{133},{134},{135},{136},{137},{138},{139},{140},{141},{142},{143},{144},"+ + "{145},{146},{147},{148}\n").format( timestamp, # 0 data['timestamp'], # 1 interval, # 2 @@ -592,9 +594,9 @@ def start(self): """Start the monitoring threads.""" self.run() if self.use_state_file: - logger.info(f'Started monitoring statistics from API for {self.target}') - else: logger.info(f'Started monitoring statistics from {self.statistics_file}') + else: + logger.info(f'Started monitoring statistics from API for {self.target}') def shutdown(self):