Skip to content

Commit

Permalink
feat(wazuh): Add JVM proxy configuration for Slack notifications
Browse files Browse the repository at this point in the history
Add JVM proxy settings to wazuh-indexer configuration to enable OpenSearch
Dashboard Slack notifications when running behind a proxy. The configuration:
- Sets both HTTP and HTTPS proxy host and port from http_proxy_url
- Triggers wazuh-indexer restart when proxy settings change

http_proxy_url needs to be defined before running wazuh-manager.yml
  • Loading branch information
grzegorzkoper committed Jan 8, 2025
1 parent 1e221f3 commit 42724cb
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions etc/kayobe/ansible/wazuh-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -126,3 +143,8 @@
service:
name: wazuh-manager
state: restarted

- name: Restart wazuh-indexer
service:
name: wazuh-indexer
state: restarted

0 comments on commit 42724cb

Please sign in to comment.