# How to configure proxy for alert destinations

**URL:** <https://forum.opensearch.org/t/how-to-configure-proxy-for-alert-destinations/836>\
**Category:** Alerting\
**Created:** [June 4, 2019, 5:22pm UTC](https://forum.opensearch.org/t/how-to-configure-proxy-for-alert-destinations/836 "2019-06-04T17:22:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![thanurak](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@thanurak](https://forum.opensearch.org/u/thanurak)\
**Post date:** [June 4, 2019, 5:22pm UTC](https://forum.opensearch.org/t/how-to-configure-proxy-for-alert-destinations/836/1 "2019-06-04T17:22:48Z")

</div>

I’m running OpenDistro for elasticsearch and Kibana on CentOS7 virtual machine.

I ran into an issue that my slack webhook is not reachable from ODfES  
[Previous topic](https://forum.opensearch.org/t/exception-publishing-message-destinationtype-slack/772/2)

I think the issue I have is, I’m behind a proxy.

I found that http proxy support was added with this [PR](https://github.com/opendistro-for-elasticsearch/alerting/pull/23/files)  
But I couldn’t find proper details/document on how to configure this.

Installed Packages  
opendistroforelasticsearch.noarch: 0.9.0-1  
opendistroforelasticsearch-kibana.x86\_64: 0.9.0-1

On the host, i have already added the proxy as environment variable  
Note: yum etc works fine with the proxy

```
[root@t<Host>]# cat /etc/environment
http_proxy=http://proxy.example.com:80
https_proxy=http://proxy.example.com:80

```

furthermore as I mentioned in my previous topic slack endpoint works/reachable via curl

```
[root@SourceHost ~]# curl -X POST -H "Content-Type: application/json" -d '{"text":"Failed Login Attempt on \n\n Monitor Windows authentication failures just entered alert status. Please investigate the issue.\n- Trigger: Windows authentication failures - Trigger\n- Severity: 1\n- Period start: 2019-05-28T00:18:12.394Z\n- Period end: 2019-05-28T00:19:12.394Z"}' https://hooks.slack.com/services/blah/blah/blaaaaaaaaaaaaaaaaaah
ok
[root@SourceHost ~]#

```

Can someone help me on this.

---

<div class="post-metadata">

**Author:** ![thanurak](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@thanurak](https://forum.opensearch.org/u/thanurak)\
**Post date:** [June 5, 2019, 5:12pm UTC](https://forum.opensearch.org/t/how-to-configure-proxy-for-alert-destinations/836/2 "2019-06-05T17:12:37Z")

</div>

Damn… Finally got it working after few days

If you are behind a proxy you need to add below configs to your “/etc/elasticsearch/jvm.options” file

```
-Dhttp.proxyHost=proxy.example.com
-Dhttp.proxyPort=80
-Dhttps.proxyHost=proxy.example.com
-Dhttps.proxyPort=80

```

With this changes, you need to restart elasticsearch and you are good to go.

---

<div class="post-metadata">

**Author:** ![HeiDri](https://avatars.discourse-cdn.com/v4/letter/h/7ba0ec/32.png) [@HeiDri](https://forum.opensearch.org/u/HeiDri)\
**Post date:** [May 5, 2020, 12:02pm UTC](https://forum.opensearch.org/t/how-to-configure-proxy-for-alert-destinations/836/3 "2020-05-05T12:02:39Z")

</div>

> [@thanurak](#):
>
> [root@SourceHost ~]# curl -X POST -H “Content-Type: application/json” -d ‘{“text”:“Failed Login Attempt on \n\n Monitor Windows authentication failures just entered alert status. Please investigate the issue.\n- Trigger: Windows authentication failures - Trigger\n- Severity: 1\n- Period start: 2019-05-28T00:18:12.394Z\n- Period end: 2019-05-28T00:19:12.394Z”}’ [https://hooks.slack.com/services/blah/blah/blaaaaaaaaaaaaaaaaaah](https://hooks.slack.com/services/blah/blah/blaaaaaaaaaaaaaaaaaah) ok [root@SourceHost ~]#

Hi thanurak , i’ve added configs to jvm.options but it’s not working !! any idea ?  
Thank you in advance.

---

<div class="post-metadata">

**Author:** ![lowgitek](https://avatars.discourse-cdn.com/v4/letter/l/dec6dc/32.png) [@lowgitek](https://forum.opensearch.org/u/lowgitek)\
**Post date:** [August 27, 2020, 5:12pm UTC](https://forum.opensearch.org/t/how-to-configure-proxy-for-alert-destinations/836/4 "2020-08-27T17:12:59Z")

</div>

I have the exactly same problem it just ignores the username and password

In my case my proxy needs a username and password we tried with

-Dhttp.proxyUser=user  
-Dhttp.proxyPassword=pass

java.security.AccessControlException: access denied (“java.net.NetPermission” “requestPasswordAuthentication”)

Cheers,

Elton

---

<div class="post-metadata">

**Author:** ![jlm](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jlm](https://forum.opensearch.org/u/jlm)\
**Post date:** [February 18, 2025, 2:58pm UTC](https://forum.opensearch.org/t/how-to-configure-proxy-for-alert-destinations/836/5 "2025-02-18T14:58:23Z")

</div>

Hi @lowgitek ,

I actually have the same issue, i didn’t manage to fix with http.proxyUser parameter (like you). Did you fix your problem ?

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [March 10, 2025, 6:59pm UTC](https://forum.opensearch.org/t/how-to-configure-proxy-for-alert-destinations/836/6 "2025-03-10T18:59:34Z")

</div>

@jlm This issue regards ODFE which was based on Elasticsearch and Kibana.  
Is your issue related to ODFE or OpenSearch?

Please open a new thread in the forum and share your software information and detailed issue description.

---

<div class="post-metadata">

**Author:** ![jlm](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jlm](https://forum.opensearch.org/u/jlm)\
**Post date:** [March 31, 2025, 9:11am UTC](https://forum.opensearch.org/t/how-to-configure-proxy-for-alert-destinations/836/7 "2025-03-31T09:11:27Z")

</div>

@pablo, my use case is on Opensearch. I always have the issue.
