Add script to parse and obtain stats from cluster CSVs #2032
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new tool inside
wazuh_testing
package that can be used to load data from CSVs and calculate some stats from it.There are two similar tools:
The objective of both tools is to parse the CSVs of all the nodes in a cluster environment, calculate statistics for each of them (mean and regression coefficient), select and return the highest values:
ClusterCSVTasksParser
is used to obtain this information from the cluster tasks (agent-info sync, Integrity check and Integrity Sync), whileClusterCSVResourcesParser
can be used to obtain information of the resource-usage of the wazuh-clusterd process (RAM, CPU, File descriptors by default).Configuration options
artifacts_path (
ClusterCSVTasksParser
,ClusterCSVResourcesParser
): Specifies the path where the CSVs of the cluster nodes are located. It must follow this format:columns (
ClusterCSVResourcesParser
): Columns of the CSV on which statistics should be extracted.Output example
TASKS
RESOURCES