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

[Remove discover] Implement embeddable dashboard on Server Management / Statistics module #6530

Closed
17 of 18 tasks
Tracked by #6477
asteriscos opened this issue Mar 18, 2024 · 6 comments · Fixed by #6542
Closed
17 of 18 tasks
Tracked by #6477
Assignees
Labels
level/subtask Subtask issue type/enhancement Enhancement issue

Comments

@asteriscos
Copy link
Member

asteriscos commented Mar 18, 2024

Description

We have to implement the embeddable dashboard on Server Management / Statistics and deprecate any use of kibana-integrations components.

Warning

The embeddable panel id must be unique including general and agents visualizations. Otherwise, the visualizations will not refresh when we pin an agent, because they are cached by id

Current Statistics screens

image

image

image

image

image

Important

Note that the node selector modifies the visualization query, when in cluster mode.

image

Tasks

  • Implement the embeddable dashboard on Server Management / Statistics
    • Migrate visualizations to embeddable panels
    • Add new searchbar
    • Maintain the operation of the selector according to the manager/cluster mode
    • Change index pattern selection mechanism (Dependence: [Remove discover] Change index pattern selector mechanism #6434)
    • Once the two previous points have been applied, corroborate filter behavior with respect to hide alerts and allow agents.
    • Clean obsolete code
    • Fix problem that causes the statistics index to not be generated.
    • Add apiName filter.
    • Add nodeName filter.
  • Check the following:
    • Each visualization, if applicable, must have interaction so that it adds the corresponding date range upon clicking.
    • The visualizations have to be updated according to the date range applied in the searchbar.
    • The opensearch request of Events processed and Events dropped visualizations must have the nodeName filter and nodeName.keyword key filter when a node is selected in cluster mode.
    • The opensearch request of visualizations must have the nodeName filter when a node is selected in cluster mode.
    • Check that the node selector does not appear in manager mode.
    • Check that the apiName filter appears in the opensearch request of the visualizations .
    • Check that the statistics index is created correctly, consulting the indexes through devTools: GET _cat/indices

Source task

@asteriscos asteriscos self-assigned this Mar 18, 2024
@asteriscos asteriscos added type/enhancement Enhancement issue level/subtask Subtask issue labels Mar 18, 2024
@wazuhci wazuhci moved this to In progress in Release 4.9.0 Mar 18, 2024
@jbiset jbiset self-assigned this Mar 18, 2024
@asteriscos asteriscos removed their assignment Mar 19, 2024
@jbiset
Copy link
Member

jbiset commented Mar 20, 2024

Updates 19/03/2024 - 20/03/2024

  • Migrated visualizations to embeddable panels, including the operation of the selector according to the manager/cluster mode.
  • The design is refactored so that it is similar to the rest of the dashboards
  • Extra code is cleaned that is not necessary unlike other dashboards because the parent component already controls it (loadings, no results, conditional rendering)

Current screens

Manager mode

image

Cluster mode

image

The task is blocked until the dependencies are resolved

@jbiset jbiset linked a pull request Mar 20, 2024 that will close this issue
20 tasks
@wazuhci wazuhci moved this from In progress to Blocked in Release 4.9.0 Mar 20, 2024
@wazuhci wazuhci moved this from Blocked to In progress in Release 4.9.0 Apr 9, 2024
@jbiset
Copy link
Member

jbiset commented Apr 9, 2024

Update 09/04/2024

  • Changed index pattern selection mechanism with new data source.
  • Corroborated filter behavior with respect to hide alerts, allow agents.

@jbiset
Copy link
Member

jbiset commented Apr 10, 2024

Update 10/04/2024

  • Fixed an issue in manage-hosts.ts by fixing the cluster_info attribute not being added correctly and the statistics index not being generated.
  • Conditionals are added for the rendering of the visualizations if the data source exists.
  • Requests from the visualizations are analyzed and tested, comparing them with the previous version to corroborate that the correct filters are being sent depending on whether the cluster mode and the node selection are activated or not.

Evidence of statistics index creation solution

image

To do:

  • Check if it is necessary to add an apiName filter based on a conditional replacement of filter values done in plugins/main/server/controllers/wazuh-elastic.ts.

@jbiset
Copy link
Member

jbiset commented Apr 11, 2024

Update 11/04/2024

  • Checked, tested and added the apiName filter in the data source so that it appears in the opensearch request of the visualizations.

image

  • Added loading while loading data source

image

  • Added nodeName filter when a node is selected in cluster mode

image

@wazuhci wazuhci moved this from In progress to Pending review in Release 4.9.0 Apr 12, 2024
@jbiset
Copy link
Member

jbiset commented Apr 16, 2024

Update 16/04/2024

  • Deleted unused use-build-statistics-visualizations hook

@jbiset
Copy link
Member

jbiset commented Apr 19, 2024

Update 19/04/2024

  • Added withUserAuthorizationPrompt to add protection with the user permissions check

@wazuhci wazuhci moved this from Pending review to In review in Release 4.9.0 Apr 22, 2024
@jbiset jbiset closed this as completed Apr 22, 2024
@wazuhci wazuhci moved this from In review to Done in Release 4.9.0 Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/subtask Subtask issue type/enhancement Enhancement issue
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants