From d67dff42dcfef04e31847431c6d461b330f442a0 Mon Sep 17 00:00:00 2001 From: Grzegorz Koper Date: Thu, 9 Jan 2025 15:23:11 +0000 Subject: [PATCH] Merge pull request #1445 from stackhpc/wazuh_alerts_proxy_fix feat(wazuh): Add JVM proxy configuration for Slack notifications --- etc/kayobe/ansible/wazuh-manager.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/etc/kayobe/ansible/wazuh-manager.yml b/etc/kayobe/ansible/wazuh-manager.yml index d4013ebd6..868af5786 100644 --- a/etc/kayobe/ansible/wazuh-manager.yml +++ b/etc/kayobe/ansible/wazuh-manager.yml @@ -116,6 +116,23 @@ notify: - Restart wazuh + - name: Add JVM proxy settings to wazuh-indexer + blockinfile: + path: "/etc/wazuh-indexer/jvm.options" + state: present + owner: root + group: wazuh + marker: "# {mark} ANSIBLE MANAGED BLOCK JVM PROXY SETTINGS" + block: | + -Dhttp.proxyHost={{ http_proxy_url | urlsplit('hostname') }} + -Dhttp.proxyPort={{ http_proxy_url | urlsplit('port') }} + -Dhttps.proxyHost={{ http_proxy_url | urlsplit('hostname') }} + -Dhttps.proxyPort={{ http_proxy_url | urlsplit('port') }} + backup: yes + when: http_proxy_url is defined + notify: + - Restart wazuh-indexer + - name: Perform health check against filebeat command: filebeat test output changed_when: false @@ -126,3 +143,8 @@ service: name: wazuh-manager state: restarted + + - name: Restart wazuh-indexer + service: + name: wazuh-indexer + state: restarted