# HTTP\_POLLER plugin failing to connect to the REST API via proxy

**URL:** <https://discuss.elastic.co/t/http-poller-plugin-failing-to-connect-to-the-rest-api-via-proxy/242824>\
**Category:** Logstash\
**Created:** [July 28, 2020, 4:29am UTC](https://discuss.elastic.co/t/http-poller-plugin-failing-to-connect-to-the-rest-api-via-proxy/242824 "2020-07-28T04:29:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaurav\_Deoras](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gaurav_deoras/32/67546_2.png) [@Gaurav\_Deoras](https://discuss.elastic.co/u/Gaurav_Deoras)\
**Post date:** [July 28, 2020, 4:29am UTC](https://discuss.elastic.co/t/http-poller-plugin-failing-to-connect-to-the-rest-api-via-proxy/242824/1 "2020-07-28T04:29:08Z")

</div>

Hi Team,

I'm trying to use logstash to pull the log through rest API and plan to further forward it to the SIEM. The setup is pretty straight forward. SIEM \<== Logstash (server) ==\> Proxy ==\> FW ==\> API Host.  
The have verified that API is accessible through proxy, however, I don't see any hit on the proxy through logstash.

gd@logstash:/home/gd\> curl -k -v '[http://qatechtesting.com](http://qatechtesting.com)'

- Could not resolve host: [qatechtesting.com](http://qatechtesting.com); Unknown error
- Closing connection 0  
curl: (6) Could not resolve host: [qatechtesting.com](http://qatechtesting.com); Unknown error

I tried setting up proxy configuration within the plugin, it failed

Set proxy in /etc/systemd/system/logstash.service.d/proxy.conf

export http\_proxy=url:port  
export https\_proxy=url:port  
export HTTP\_PROXY=url:port  
export HTTPS\_PROXY=url:port

Based on few articles, setup proxy config in logstash-plugin  
export JRUBY\_OPTS='-J-Dhttp.proxyHost=proxy -J-Dhttp.proxyPort=port -J-Dhttp.proxyUser=user -J-Dhttp.proxyPassword=pwd' DEBUG=1 ./bin/logstash-plugin install logstash-input-stomp

Validated the proxy config in jvm.options.

Still can't see a single hit on the proxy, unsure what's wrong and what's the right proxy config, if missed anything.

HTTP\_POLLER config:

input {  
http\_poller {  
urls =\> {  
urlname =\> "[http://qatechtesting.com](http://qatechtesting.com)"  
}  
request\_timeout =\> 60  
tags =\> test  
schedule =\> { "every" =\> "20s"}  
proxy =\> { host=\> "proxyurl" port =\> 8080 scheme =\> http user =\> "name" password =\> "pwd"}  
codec =\> "line"  
}  
}

output {  
stdout {  
codec =\> rubydebug

Please help!

---

<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 25, 2020, 4:29am UTC](https://discuss.elastic.co/t/http-poller-plugin-failing-to-connect-to-the-rest-api-via-proxy/242824/2 "2020-08-25T04:29:14Z")

</div>

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