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

[API][Framework] Improve agents overview endpoint #6754

Conversation

vicferpoy
Copy link
Contributor

Hello team,
this closes #6747 .

We noticed the overview endpoint was taking too much time on very big environments. To improve this, we have saved some of the core functions in cache and refactored the function. This will need a bigger cluster refactor as the issue is not resolved, but it is much faster.

Tests performed

Integration tests

test_agents_DELETE_endpoints.tavern.yaml 
	 7 passed, 9 warnings

test_agents_GET_endpoints.tavern.yaml 
	 90 passed, 97 warnings

test_agents_POST_endpoints.tavern.yaml 
	 5 passed, 7 warnings

test_agents_PUT_endpoints.tavern.yaml 
	 9 passed, 11 warnings

test_overview_endpoints.tavern.yaml 
	 1 passed, 3 warnings

Regards,
Víctor.

@vicferpoy vicferpoy self-assigned this Nov 27, 2020
@davidjiglesias davidjiglesias merged commit f614772 into fix/rbac-expand-agent-resources Nov 27, 2020
@davidjiglesias davidjiglesias deleted the fix/6747-overview-big-environments branch November 27, 2020 15:23
davidjiglesias added a commit that referenced this pull request Nov 30, 2020
* Rework core agent resources functions

* Add agent 000 to agents_info

* Add intersection of system agents when expanding groups

* Fix cluster validation and increase timeout

* Fix framework unit tests.

* Update cluster utils unittests.

* Optimize agents overview endpoint (#6754)

* Refactor wazuh-clusterd script

* Set timeouts back

* Fix unit test

Co-authored-by: Víctor Fernández Poyatos <vicferpoy@gmail.com>
Co-authored-by: David Jose Iglesias Lopez <davidj.iglesias@wazuh.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants