Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor StatesMonitoring class to utilize API instead of .state files #4890

Closed
2 of 3 tasks
Tracked by #20776
Rebits opened this issue Jan 31, 2024 · 3 comments · Fixed by #4970
Closed
2 of 3 tasks
Tracked by #20776

Refactor StatesMonitoring class to utilize API instead of .state files #4890

Rebits opened this issue Jan 31, 2024 · 3 comments · Fixed by #4970
Assignees

Comments

@Rebits
Copy link
Member

Rebits commented Jan 31, 2024

Description:

The CLUSTER-Workload_benchmarks_metrics pipeline currently relies on the Wazuh QA library scripts to monitor Wazuh process and daemon statistics. However, a crucial aspect is the utilization of the wazuh-statistics script, which currently fetches information through .state files instead of utilizing the designated API. This has led to the following issues:

  • Presently, certain information related to the analysisd statatistics information is unavailable. For instance, it is not feasible to ascertain the quantity of Vulnerability Detector events has been decoded in the environment.
  • The use of .state files is planned to be deprecated.

This change is imperative to ensure the acquisition of reliable data for benchmarking the Vulnerability Detector refactor. Further details can be found in the related issue wazuh/wazuh#20776.

Note

Footprint tests were already updated in https://github.com/wazuh/wazuh-jenkins/issues/4551. We should consider unifiy monitoring tools in order to avoid this discrepancies in the future.

Tasks to Perform

  • Modify the StatisticsMonitor class and the wazuh-statistic script to utilize the API instead of relying on the deprecated .state files.

Validation

  • Ensure all the daemons statistics information is obtained in a local testing
  • Ensure all the daemons statistics information is obtained in the CLUSTER-Workload_benchmarks_metrics pipeline
@Deblintrake09
Copy link
Contributor

Update

After discussing in meeting the changes to apply, it was decided that the following approach is going to be taken:

  • Mantain support of state files while they are still available.
  • Add option to use API as source of data, so it can be used if needed.
  • When state files are removed and all data is moved to the API we can then remove the state file support.

Development is done in branch https://github.com/wazuh/wazuh-qa/tree/4890-statistics-monitor-enhancement

@wazuhci wazuhci moved this from In progress to On hold in Release 4.8.0 Feb 8, 2024
@wazuhci wazuhci moved this from On hold to In progress in Release 4.8.0 Feb 15, 2024
@Deblintrake09 Deblintrake09 linked a pull request Feb 16, 2024 that will close this issue
@Deblintrake09
Copy link
Contributor

Update

@wazuhci wazuhci moved this from In progress to In review in Release 4.8.0 Feb 21, 2024
@wazuhci wazuhci moved this from In review to On hold in Release 4.8.0 Feb 21, 2024
@wazuhci wazuhci moved this from On hold to Pending review in Release 4.8.0 Feb 21, 2024
@wazuhci wazuhci moved this from Pending review to Pending final review in Release 4.8.0 Feb 21, 2024
@davidjiglesias
Copy link
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
3 participants