You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2021/11/08 15:04:35 INFO: wazuh-wui 172.22.0.12 "GET /cluster/status" with parameters {} and body {} done in 0.029s: 200
2021/11/08 15:04:35 INFO: wazuh-wui 172.22.0.12 "GET /cluster/status" with parameters {} and body {} done in 0.028s: 200
2021/11/08 15:04:35 INFO: wazuh-wui 172.22.0.12 "GET /cluster/nodes" with parameters {} and body {} done in 0.054s: 200
2021/11/08 15:04:35 INFO: wazuh-wui 172.22.0.12 "GET /cluster/nodes" with parameters {} and body {} done in 0.016s: 200
2021/11/09 12:21:01 INFO: wazuh-wui 172.19.0.105 "GET /agents" with parameters {"q": "id=000"} and body {} done in 0.014s: 200
Improvements and suggestions
Don't use a query to get only one agent. The following will be always faster: GET /agents?agents_list=000
The requests used to check cluster health are done twice, could we avoid the second request to each endpoint?
We should change the request
This needs a deep analysis.
When choosing some configurations (global for instance)
Issue
2021/11/08 15:13:43 INFO: wazuh-wui 172.22.0.12 "GET /cluster/master-node/configuration/analysis/global" with parameters {} and body {} done in 0.017s: 200
2021/11/08 15:13:44 ERROR: Error connecting with socket
Traceback (most recent call last):
File "/var/ossec/framework/python/lib/python3.9/site-packages/wazuh-4.2.4-py3.9.egg/wazuh/core/wazuh_socket.py", line 27, in _connect
self.s.connect(self.path)
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/ossec/framework/python/lib/python3.9/site-packages/wazuh-4.2.4-py3.9.egg/wazuh/core/configuration.py", line 780, in get_active_configuration
s = WazuhSocket(dest_socket)
File "/var/ossec/framework/python/lib/python3.9/site-packages/wazuh-4.2.4-py3.9.egg/wazuh/core/wazuh_socket.py", line 22, in __init__
self._connect()
File "/var/ossec/framework/python/lib/python3.9/site-packages/wazuh-4.2.4-py3.9.egg/wazuh/core/wazuh_socket.py", line 29, in _connect
raise WazuhException(1013, str(e))
wazuh.core.exception.WazuhException: Error 1013 - Unable to connect with socket: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/ossec/framework/python/lib/python3.9/site-packages/wazuh-4.2.4-py3.9.egg/wazuh/core/cluster/dapi/dapi.py", line 256, in execute_local_request
data = await asyncio.wait_for(task, timeout=timeout)
File "/var/ossec/framework/python/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
return fut.result()
File "/var/ossec/framework/python/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/var/ossec/framework/python/lib/python3.9/site-packages/wazuh-4.2.4-py3.9.egg/wazuh/core/cluster/dapi/dapi.py", line 230, in run_local
data = self.f(**self.f_kwargs)
File "/var/ossec/framework/python/lib/python3.9/site-packages/wazuh-4.2.4-py3.9.egg/wazuh/rbac/decorators.py", line 406, in wrapper
result = func(*args, **kwargs) if not skip_execution else None
File "/var/ossec/framework/python/lib/python3.9/site-packages/wazuh-4.2.4-py3.9.egg/wazuh/manager.py", line 222, in get_config
data = configuration.get_active_configuration(agent_id='000', component=component, configuration=config)
File "/var/ossec/framework/python/lib/python3.9/site-packages/wazuh-4.2.4-py3.9.egg/wazuh/core/configuration.py", line 782, in get_active_configuration
raise WazuhInternalError(1121)
wazuh.core.exception.WazuhInternalError: Error 1121 - Error connecting with socket
2021/11/08 15:13:44 INFO: wazuh-wui 172.22.0.12 "GET /cluster/master-node/configuration/mail/global" with parameters {} and body {} done in 0.019s: 500
2021/11/08 15:13:44 INFO: wazuh-wui 172.22.0.12 "GET /security/user/authenticate" with parameters {} and body {} done in 0.171s: 200
2021/11/08 15:13:44 INFO: wazuh-wui 172.22.0.12 "GET /manager/info" with parameters {} and body {} done in 0.044s: 200
2021/11/08 15:13:44 INFO: wazuh-wui 172.22.0.12 "GET /agents" with parameters {"agents_list": "000"} and body {} done in 0.018s: 200
2021/11/08 15:13:44 INFO: wazuh-wui 172.22.0.12 "GET /cluster/status" with parameters {} and body {} done in 0.020s: 200
2021/11/08 15:13:44 INFO: wazuh-wui 172.22.0.12 "GET /cluster/local/info" with parameters {} and body {} done in 0.017s: 200
2021/11/08 15:13:44 INFO: wazuh-wui 172.22.0.12 "GET /cluster/master-node/configuration/request/remote" with parameters {} and body {} done in 0.016s: 200
2021/11/08 15:13:44 INFO: wazuh-wui 172.22.0.12 "GET /cluster/master-node/configuration/com/logging" with parameters {} and body {} done in 0.015s: 200
From what I was investigating the repeated requests were being executed to change the state of redux which is currently not being used and also sent by props to some components to check permissions, it was added in this commit but then in this other commit it is changed, and it is deprecated as well. Therefore, as it is code that is not being used, I am going to delete it to clean up the code.
Description
Analysis: #5233
This needs a deep analysis.
The text was updated successfully, but these errors were encountered: