# Set proxy in heartbeat

**URL:** <https://discuss.elastic.co/t/set-proxy-in-heartbeat/224163>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [March 18, 2020, 5:18pm UTC](https://discuss.elastic.co/t/set-proxy-in-heartbeat/224163 "2020-03-18T17:18:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin020](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@Robin020](https://discuss.elastic.co/u/Robin020)\
**Post date:** [March 18, 2020, 5:18pm UTC](https://discuss.elastic.co/t/set-proxy-in-heartbeat/224163/1 "2020-03-18T17:18:45Z")

</div>

I am trying to use a proxy for monitoring an url.  
I found this option:  
` proxy_url: socks5://user:password@socks5-proxy:2233`

I have a proxy without auth so this is the what I have created:  
`proxy_url : socks4://<IP>:<PORT>`

But it seems to be wrong. Does somebody know the correct syntax?

Best regards,  
Robin

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [March 19, 2020, 12:02pm UTC](https://discuss.elastic.co/t/set-proxy-in-heartbeat/224163/2 "2020-03-19T12:02:58Z")

</div>

Could you please share your configuration formatted using `</>`? Also, debug logs would be useful to see what is going wrong.

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [March 19, 2020, 12:25pm UTC](https://discuss.elastic.co/t/set-proxy-in-heartbeat/224163/3 "2020-03-19T12:25:33Z")

</div>

Also, can you confirm that you're using a SOCKS proxy, and not an HTTP one? An HTTP proxy would have an `http` prefix for the URL.

---

<div class="post-metadata">

**Author:** ![Robin020](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@Robin020](https://discuss.elastic.co/u/Robin020)\
**Post date:** [March 19, 2020, 1:34pm UTC](https://discuss.elastic.co/t/set-proxy-in-heartbeat/224163/4 "2020-03-19T13:34:08Z")

</div>

Hi,

Thanks for your responses. Here is the config:

```
- type: tcp
  name: TCP_URL_CHECKS
  schedule: '@every 10s'
  hosts: ["<HOST>"]
  ports: [443]
  proxy_url: 'socks5://<IP>:<PORT>'

```

Is it true it only supports socks5 proxies and no socks4? When I use socks4 proxy, he doesn't recognize the scheme: `socks4://`.  
And it is a socks5 proxy which I am using.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 16, 2020, 1:34pm UTC](https://discuss.elastic.co/t/set-proxy-in-heartbeat/224163/5 "2020-04-16T13:34:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
