# Configuring Filebeat to use proxy for any input request that goes out

**URL:** https://discuss.elastic.co/t/configuring-filebeat-to-use-proxy-for-any-input-request-that-goes-out/279485
**Category:** Beats
**Tags:** filebeat
**Created:** [July 23, 2021, 1:32pm UTC](https://discuss.elastic.co/t/configuring-filebeat-to-use-proxy-for-any-input-request-that-goes-out/279485 "2021-07-23T13:32:25Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![code4purpose](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/code4purpose/32/92054_2.png) [@code4purpose](https://discuss.elastic.co/u/code4purpose)
#### Post date: [July 23, 2021, 1:32pm UTC](https://discuss.elastic.co/t/configuring-filebeat-to-use-proxy-for-any-input-request-that-goes-out/279485/1 "2021-07-23T13:32:25Z")

</div>

I am running Elasticsearch, Kibana and Filebeats on my office windows laptop. I am trying to use filebeat -microsoft module. All outgoing http/s requests go via a proxy. How do I Configure Filebeat to use proxy for any input request that goes out (not just microsoft module). Setting HTTP\_PROXY HTTPS\_PROXY as environment variable does not seem to do the trick.

I see proxy setting for output to Elasticsearch & Kibana. But Is there configuration setting for proxy url for input requests ?

---

<div class="post-metadata">

### Author: ![legoguy1000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/legoguy1000/32/54301_2.png) [@legoguy1000](https://discuss.elastic.co/u/legoguy1000)
#### Post date: [July 23, 2021, 11:22pm UTC](https://discuss.elastic.co/t/configuring-filebeat-to-use-proxy-for-any-input-request-that-goes-out/279485/2 "2021-07-23T23:22:22Z")

</div>

Yes, any module that uses the `httpjson` input has the `var.proxy_url` setting that u can set.

---

<div class="post-metadata">

### Author: ![code4purpose](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/code4purpose/32/92054_2.png) [@code4purpose](https://discuss.elastic.co/u/code4purpose)
#### Post date: [July 26, 2021, 7:56am UTC](https://discuss.elastic.co/t/configuring-filebeat-to-use-proxy-for-any-input-request-that-goes-out/279485/3 "2021-07-26T07:56:37Z")

</div>

I had the following entry in the microsoft module. It is not being used.

m365\_defender:  
enabled: true  
# How often the API should be polled  
var.interval: 1m

```
var.proxy_url: proxy_domain_name:8080

```

If I set the proxy\_domain\_name the to HTTPS\_PROXY then the curl command is working properly. Even after setting up filebeat module again, the proxy url is not recognised.

---

<div class="post-metadata">

### Author: ![legoguy1000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/legoguy1000/32/54301_2.png) [@legoguy1000](https://discuss.elastic.co/u/legoguy1000)
#### Post date: [July 26, 2021, 11:20am UTC](https://discuss.elastic.co/t/configuring-filebeat-to-use-proxy-for-any-input-request-that-goes-out/279485/4 "2021-07-26T11:20:31Z")

</div>

What version of filebeat?

---

<div class="post-metadata">

### Author: ![code4purpose](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/code4purpose/32/92054_2.png) [@code4purpose](https://discuss.elastic.co/u/code4purpose)
#### Post date: [July 26, 2021, 1:11pm UTC](https://discuss.elastic.co/t/configuring-filebeat-to-use-proxy-for-any-input-request-that-goes-out/279485/5 "2021-07-26T13:11:00Z")

</div>

filebeat-7.13.4

---

<div class="post-metadata">

### Author: ![legoguy1000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/legoguy1000/32/54301_2.png) [@legoguy1000](https://discuss.elastic.co/u/legoguy1000)
#### Post date: [July 27, 2021, 12:59am UTC](https://discuss.elastic.co/t/configuring-filebeat-to-use-proxy-for-any-input-request-that-goes-out/279485/6 "2021-07-27T00:59:30Z")

</div>

What do the logs show? Any errors? Us the connection being attempted without the proxy even when it's set or just not working?

---

<div class="post-metadata">

### Author: ![code4purpose](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/code4purpose/32/92054_2.png) [@code4purpose](https://discuss.elastic.co/u/code4purpose)
#### Post date: [July 27, 2021, 7:48pm UTC](https://discuss.elastic.co/t/configuring-filebeat-to-use-proxy-for-any-input-request-that-goes-out/279485/7 "2021-07-27T19:48:44Z")

</div>

Thank you very much. var.proxy\_url resolved the issue. I did not have the protocol (http://) as part of it earlier. Once I added it resolved the issue.

---

<div class="post-metadata">

### Author: ![legoguy1000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/legoguy1000/32/54301_2.png) [@legoguy1000](https://discuss.elastic.co/u/legoguy1000)
#### Post date: [July 27, 2021, 8:16pm UTC](https://discuss.elastic.co/t/configuring-filebeat-to-use-proxy-for-any-input-request-that-goes-out/279485/8 "2021-07-27T20:16:55Z")

</div>

Awesome

---

<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: [August 24, 2021, 10:17pm UTC](https://discuss.elastic.co/t/configuring-filebeat-to-use-proxy-for-any-input-request-that-goes-out/279485/9 "2021-08-24T22:17:24Z")

</div>

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