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

Data-visualizer error while creating graphs for remoted stats #3941

Closed
Selutario opened this issue Feb 15, 2023 · 1 comment
Closed

Data-visualizer error while creating graphs for remoted stats #3941

Selutario opened this issue Feb 15, 2023 · 1 comment
Labels
level/task Task issue refactor Redesign and implement an existing development/feature type/change

Comments

@Selutario
Copy link
Contributor

Target version Related issue Related PR/dev branch
- - -

Description

The stats generated by wazuh-statistics tool for remoted:

wazuh-statistics -t remote -s 5 --store /tmp/remoted

seem to no longer contain the "queued_msgs" field, or at least not always. This causes an error when trying to generate graphs (stats used), as can be seen below:

# data-visualizer -s /tmp/logs/data/stats/remoted/wazuh-remoted_stats.csv -t remote -d /tmp/graphs3/ -n wazuh-remoted_stats
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/pandas/core/indexes/base.py", line 3802, in get_loc
    return self._engine.get_loc(casted_key)
  File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index.pyx", line 165, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 5745, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 5753, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'queued_msgs'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/data-visualizer", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/wazuh_testing/scripts/data_visualizations.py", line 33, in main
    dv.plot()
  File "/usr/local/lib/python3.8/dist-packages/wazuh_testing/tools/performance/visualization.py", line 299, in plot
    self._plot_remoted_dataset()
  File "/usr/local/lib/python3.8/dist-packages/wazuh_testing/tools/performance/visualization.py", line 263, in _plot_remoted_dataset
    self._plot_data(elements=columns, title=title, generic_label=element)
  File "/usr/local/lib/python3.8/dist-packages/wazuh_testing/tools/performance/visualization.py", line 243, in _plot_data
    self._basic_plot(ax, self.dataframe[element], label=element, color=color)
  File "/usr/local/lib/python3.8/dist-packages/pandas/core/frame.py", line 3807, in __getitem__
    indexer = self.columns.get_loc(key)
  File "/usr/local/lib/python3.8/dist-packages/pandas/core/indexes/base.py", line 3804, in get_loc
    raise KeyError(key) from err
KeyError: 'queued_msgs'

This means that during the workload benchmark tests it is not possible to generate remoted plots. Moreover, a very similar change was already necessary in the past:

The list of headers should be updated again to remove the "queued_msgs" field or, even better, modify the tool to make it more flexible to the fields it can find in the CSV.

@jmv74211 jmv74211 added subteam/qa-main refactor Redesign and implement an existing development/feature and removed status/not-tracked labels Feb 17, 2023
@davidjiglesias
Copy link
Member

To be reviewed in the upcoming refactors

@davidjiglesias davidjiglesias closed this as not planned Won't fix, can't repro, duplicate, stale Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue refactor Redesign and implement an existing development/feature type/change
Projects
None yet
Development

No branches or pull requests

3 participants