-
Notifications
You must be signed in to change notification settings - Fork 176
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
Fix health check error when there is no vulnerabilities indices #6231
Fix health check error when there is no vulnerabilities indices #6231
Conversation
Test 🟢Warning and continue button in health-check 🟢Health-check with everything OK before redirecting 🟢Vulnerabilities dashboard tab when search does not return data 🟢Vulnerabilities inventory tab when search does not return data 🟢Health-check on Vagrant test 🟢Vulnerabilities dashboard tab when no indices on Vagrant test 🟢 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vulnerabilities Dashboard doesn't show any data but the index has data
…o-vulnerabilities-indices
…o-vulnerabilities-indices
|
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: ✔️
Test: ✔️
Warning and continue button in health-check - Dev environment
Health-check with everything OK before redirecting
Vulnerabilities dashboard tab when search does not return data
Vulnerabilities inventory tab when search does not return data
Health-check on Vagrant test
Vulnerabilities dashboard tab when no indices on Vagrant test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This pull request resolve an error when there's no vulnerabilities indices. Now when there is a warning in the health check due to the vulnerability index, it shows the warning and does not continue with the redirection but instead shows a button to continue. If everything is fine if the redirection continues.
A problem is also resolved when errors are logged in the warning health-check, which generated an error instead of a warning in the production environment.
Finally, the rendering behavior of the vulnerability dashboard tab is also changed when there is no data, showing a notification that there is no data.
Issues Resolved
Evidence
Warning and continue button in health-check
Health-check with everything OK before redirecting
Vulnerabilities dashboard tab when search does not return data
Vulnerabilities inventory tab when search does not return data
Health-check on Vagrant test
Vulnerabilities dashboard tab when no indices on Vagrant test
Test
/health-check
, taking into account that it does not have the?debug
query./health-check
, taking into account that it does not have the?debug
query."No results match your search criteria"
.Considerations with the Vagrant test
In principle it is necessary to have the wazuh plugin package (
wazuh-2.10.0.zip
) that is inside the github actions zip at the same level as the Vagrantfile archive and, whenvagrant up
, inside the container in/vagrant
files appear. If they do not appear it is because the vagrantvbguest
plugin is missing.Then you need to connect via ssh (
vagrant ssh)
, go to/usr/share/wazuh-dashboard/bin
, uninstall the wazuh plugin with./opensearch-dashboards-plugin remove wazuh
and install the package version with./opensearch-dashboards-plugin install file:///vagrant/wazuh-2.10.0.zip
. If everything goes well, the application will be able to load and test the health-check at the IP listed in the Vagrantfile (192.168.56.10
) on port443
.Check List
yarn test:jest