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

Update Cluster configuration with the haproxy helper settings #6653

Conversation

yenienserrano
Copy link
Member

@yenienserrano yenienserrano commented May 8, 2024

Description

Update Cluster configuration with the haproxy helper settings

Issues Resolved

Evidence

image

Test

You can try the imposter or a manager of this branch: epic-20887-migrate-haproxy-helper

If you use a manager on that branch you will have to run this so that the manager doesn't hang. And then restart wazuh
/var/ossec/framework/python/bin/pip3 install httpx

Tests:

Always in Server Management/Settings/Cluster

Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable

UI

Test Chrome Firefox Safari
Without the haproxy_handler configuration, only the main settings should be rendered.
With the basic haproxy_handler configuration, everything should render with the default values
By adding the other settings, the changed settings should render.

Details

⚫ Without the `haproxy_handler` configuration, only the main settings should be rendered.

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ With the basic `haproxy_handler` configuration, everything should render with the default values

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ By adding the other settings, the changed settings should render.

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

These configurations go inside <cluster></cluster>

Basic settings:

    <haproxy_helper>
        <haproxy_disabled>yes</haproxy_disabled>
        <haproxy_address>wazuh-proxy</haproxy_address>
        <haproxy_user>haproxy</haproxy_user>
        <haproxy_password>haproxy</haproxy_password>
    </haproxy_helper>

All settings:

   <haproxy_helper>
        <haproxy_disabled>no</haproxy_disabled>
        <haproxy_address>wazuh-proxy</haproxy_address>
        <haproxy_user>haproxy</haproxy_user>
        <haproxy_password>haproxy</haproxy_password>
        <haproxy_port>5555</haproxy_port>
        <haproxy_protocol>http</haproxy_protocol>
        <haproxy_backend>wazuh_cluster</haproxy_backend>
        <frequency>60</frequency>
        <agent_chunk_size>100</agent_chunk_size>
        <agent_reconnection_time>10</agent_reconnection_time>
        <agent_reconnection_stability_time>60</agent_reconnection_stability_time>
        <imbalance_tolerance>0.1</imbalance_tolerance>
        <remove_disconnected_node_after>1</remove_disconnected_node_after>
        <excluded_nodes>master,worker1</excluded_nodes>
    </haproxy_helper>

Check List

  • All tests pass
    • yarn test:jest
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@yenienserrano yenienserrano marked this pull request as ready for review May 9, 2024 21:04
@JuanGarriuz JuanGarriuz self-requested a review May 14, 2024 08:51
@asteriscos asteriscos self-requested a review May 14, 2024 09:48
@JuanGarriuz
Copy link
Member

JuanGarriuz commented May 14, 2024

UI

Test Chrome Firefox Safari
Without the haproxy_handler configuration, only the main settings should be rendered. 🟢 🟢
With the basic haproxy_handler configuration, everything should render with the default values 🟢 🟢
By adding the other settings, the changed settings should render. 🟢 🟢

Details

🟢 Without the `haproxy_handler` configuration, only the main settings should be rendered.

Chrome - 🟢

image

Firefox - 🟢

image

Safari - ⚫

🟢 With the basic `haproxy_handler` configuration, everything should render with the default values

Chrome - 🟢

image

Firefox - 🟢

image

Safari - ⚫

🟢 By adding the other settings, the changed settings should render.

Chrome - 🟢

image

Firefox - 🟢

image

Safari - ⚫

These configurations go inside <cluster></cluster>

JuanGarriuz
JuanGarriuz previously approved these changes May 14, 2024
Copy link
Member

@JuanGarriuz JuanGarriuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!!

@asteriscos
Copy link
Member

asteriscos commented May 14, 2024

🟡 Missing changelog

UI

Test Chrome Firefox
Without the haproxy_handler configuration, only the main settings should be rendered. 🟢 🟢
With the basic haproxy_handler configuration, everything should render with the default values 🟢 🟢
By adding the other settings, the changed settings should render. 🟢 🟢

Details

🟢 Without the `haproxy_handler` configuration, only the main settings should be rendered.

Chrome - 🟢

image

Firefox - 🟢

image

🟢 With the basic `haproxy_handler` configuration, everything should render with the default values

Chrome - 🟢

screencapture-localhost-5601-app-settings-2024-05-14-16_53_39

Firefox - 🟢

FireShot Capture 014 - Wazuh - localhost

🟢 By adding the other settings, the changed settings should render.

Chrome - 🟢

screencapture-localhost-5601-app-settings-2024-05-14-17_40_36

Firefox - 🟢

FireShot Capture 015 - Wazuh - localhost

These configurations go inside <cluster></cluster>

asteriscos
asteriscos previously approved these changes May 14, 2024
@asteriscos asteriscos merged commit 6166c72 into 4.9.0 May 14, 2024
1 check passed
@asteriscos asteriscos deleted the 175-update-the-dashboard-panel-where-haproxy-helper-configuration-is-shown branch May 14, 2024 15:54
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.

Update the dashboard panel where HAProxy helper configuration is shown
4 participants