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

feat(wazuh): Add JVM proxy configuration for Slack notifications #1445

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

grzegorzkoper
Copy link
Contributor

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

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
@grzegorzkoper grzegorzkoper requested a review from a team as a code owner January 8, 2025 13:01
@product-auto-label product-auto-label bot added size: s ansible Ansible playbooks labels Jan 8, 2025
@Alex-Welsh
Copy link
Contributor

Great timing, I came across the same problem today. I've tried this patch but still get errors trying to trigger a test alert in the dashboard:
image
Which is the same error as trying to send a test alert with curl and no proxy.

@grzegorzkoper
Copy link
Contributor Author

Great timing, I came across the same problem today. I've tried this patch but still get errors trying to trigger a test alert in the dashboard: image Which is the same error as trying to send a test alert with curl and no proxy.

This looks like in your case you have a problem with resolving the name first ?
"hooks.slack.com : Name or service not known ? "

@Alex-Welsh
Copy link
Contributor

Alex-Welsh commented Jan 9, 2025

This looks like in your case you have a problem with resolving the name first ? "hooks.slack.com : Name or service not known ? "

In my case, that's the error I get when the proxy isn't working e.g.

$  curl example.com --noproxy '*'
curl: (6) Could not resolve host: example.com

(works fine when proxy is in use)

Copy link
Contributor

@Alex-Welsh Alex-Welsh left a comment

Choose a reason for hiding this comment

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

Templating works, just didn't work my case because DNS wasn't being proxied.

(For future reference, that was fixed by adding 3.68.124.95 hooks.slack.com to /etc/hosts)

@grzegorzkoper grzegorzkoper merged commit 8bb62b4 into stackhpc/2024.1 Jan 9, 2025
12 checks passed
@grzegorzkoper grzegorzkoper deleted the wazuh_alerts_proxy_fix branch January 9, 2025 11:06
@Alex-Welsh
Copy link
Contributor

/cherry-pick stackhpc/2023.1

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Jan 9, 2025
feat(wazuh): Add JVM proxy configuration for Slack notifications
Alex-Welsh added a commit that referenced this pull request Jan 9, 2025
…23.1

feat(wazuh): Add JVM proxy configuration for Slack notifications (cherry-pick #1445)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ansible Ansible playbooks size: s
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants