-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Migrate configuration to ossec.conf #22782
Migrate configuration to ossec.conf #22782
Conversation
d96fcb7
to
ce59e37
Compare
c0843fc
to
df3dc29
Compare
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
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.
Great job @nico-stefani. I requested only a few things. Also, although this is not a common scenario, if all active managers are excluded, this unexpected error is raised:
2024/04/18 12:12:16 CRITICAL: [Local Client] [Main] Unexpected exception: division by zero
Traceback (most recent call last):
File "/var/ossec/framework/python/lib/python3.10/site-packages/wazuh/core/cluster/hap_helper/hap_helper.py", line 547, in start
await helper.manage_wazuh_cluster_nodes()
File "/var/ossec/framework/python/lib/python3.10/site-packages/wazuh/core/cluster/hap_helper/hap_helper.py", line 411, in manage_wazuh_cluster_nodes
await self.set_hard_stop_after(wait_connection_retry=False, reconnect_agents=False)
File "/var/ossec/framework/python/lib/python3.10/site-packages/wazuh/core/cluster/hap_helper/hap_helper.py", line 459, in set_hard_stop_after
await self.proxy.set_hard_stop_after_value(
File "/var/ossec/framework/python/lib/python3.10/site-packages/wazuh/core/cluster/hap_helper/proxy.py", line 577, in set_hard_stop_after_value
hard_stop_after = (active_agents / (n_managers * chunk_size)) * n_managers * agent_reconnection_time + (
ZeroDivisionError: division by zero
2024/04/18 12:12:16 INFO: [Local Client] [Main] Process ended
Even if all nodes are excluded, it could change in the future after connecting a new one (for example, if only master is excluded and workers are installed and connected later). We should handle this better.
ce66b3f
to
16afec2
Compare
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, good job!
fb18876
into
epic-20887-migrate-haproxy-helper
Description
This PR closes #20939. Migrate the HAProxy Helper to the
ossec.conf
.The full set of options added are:
Logs/Alerts example
The Helper starts with mandatory parameters
Logs
The Helper will not start when is disabled
Logs
The Helper will not start when one mandatory parameter is missing
Logs
The Helper starts with all parameters
Logs