-
Notifications
You must be signed in to change notification settings - Fork 30
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
Adapt Monitor
class to allow child processes monitoring
#2258
Comments
Issue updateWe have decided to monitor each child process on its own, adding custom suffixes. For instance, running the following command:
root@wazuh-master:/# ll /tmp
total 20
drwxrwxrwt. 1 root root 266 Nov 24 11:29 ./
drwxr-xr-x. 1 root root 362 Nov 24 11:13 ../
drwxr-xr-x. 1 root root 54 Nov 24 11:17 process_metrics/
-rw-r--r--. 1 root root 1045 Nov 24 11:17 wazuh-apid.csv
-rw-r--r--. 1 root root 1133 Nov 24 11:17 wazuh-apid_child_1.csv
-rw-r--r--. 1 root root 1133 Nov 24 11:17 wazuh-apid_child_2.csv
-rw-r--r--. 1 root root 1172 Nov 24 11:17 wazuh-clusterd.csv
-rw-r--r--. 1 root root 1268 Nov 24 11:17 wazuh-clusterd_child_1.csv As for parent processes, the name will remain the same. |
Issue updateAfter some manual testing, I can confirm that the new implementation works as intended:
root@wazuh-master:/# ps -edf ww | egrep "clusterd|apid"
wazuh 70 1 0 09:47 ? Sl 0:10 /var/ossec/framework/python/bin/python3 /var/ossec/api/scripts/wazuh-apid.py
wazuh 575 1 0 09:47 ? Sl 0:07 /var/ossec/framework/python/bin/python3 /var/ossec/framework/scripts/wazuh-clusterd.py
wazuh 963 575 0 09:47 ? S 0:01 /var/ossec/framework/python/bin/python3 /var/ossec/framework/scripts/wazuh-clusterd.py
wazuh 1695 70 0 09:57 ? S 0:00 /var/ossec/framework/python/bin/python3 /var/ossec/api/scripts/wazuh-apid.py
wazuh 1698 70 0 09:57 ? S 0:00 /var/ossec/framework/python/bin/python3 /var/ossec/api/scripts/wazuh-apid.py
root@wazuh-master:/tmp# ll
total 20
drwxrwxrwt. 1 root root 234 Nov 25 09:57 ./
drwxr-xr-x. 1 root root 300 Nov 25 09:47 ../
drwxr-xr-x. 1 root root 54 Nov 25 09:57 process_metrics/
-rw-r--r--. 1 root root 3333 Nov 25 09:58 wazuh-apid.csv
-rw-r--r--. 1 root root 3743 Nov 25 09:58 wazuh-apid_child_1.csv
-rw-r--r--. 1 root root 3830 Nov 25 09:58 wazuh-apid_child_2.csv
-rw-r--r--. 1 root root 3620 Nov 25 09:58 wazuh-clusterd.csv
-rw-r--r--. 1 root root 4046 Nov 25 09:58 wazuh-clusterd_child_1.csv However, the root@wazuh-master:/tmp# data-visualizer -s /tmp/wazuh-apid.csv /tmp/wazuh-apid_child_1.csv /tmp/wazuh-apid_child_2.csv wazuh-clusterd.csv wazuh-clusterd_child_1.csv -t binary |
Issue updateA bug in the However, the |
Since we added multiprocessing to the Wazuh cluster and API, we need to improve the
Monitor
class used for monitoring tasks to allow child processes monitoring:wazuh-qa/deps/wazuh_testing/wazuh_testing/tools/performance/binary.py
Lines 25 to 45 in cc712b0
The design is yet to be decided and will be discussed on further issue comments.
The text was updated successfully, but these errors were encountered: