# Configuring Proxy in HTTP OUT Plugin

**URL:** <https://discuss.elastic.co/t/configuring-proxy-in-http-out-plugin/194785>\
**Category:** Logstash\
**Created:** [August 12, 2019, 4:08am UTC](https://discuss.elastic.co/t/configuring-proxy-in-http-out-plugin/194785 "2019-08-12T04:08:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rameshpasunoori](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rameshpasunoori](https://discuss.elastic.co/u/rameshpasunoori)\
**Post date:** [August 12, 2019, 4:08am UTC](https://discuss.elastic.co/t/configuring-proxy-in-http-out-plugin/194785/1 "2019-08-12T04:08:53Z")

</div>

- Version: 7.3
- Operating System: Windows 10
- Config File (if you have sensitive info, please remove it):

I tried three options to configure proxy for http out plugin.  
All these are not working, Please provide some input.  
#proxy =\> {"host" =\> 10.17.168.224", "port" =\> 3128, "scheme" =\> 'http', "user" =\> 'test', "password" =\> 'test'}

#proxy =\> "[https://test:test123@10.17.168.224:3128/](https://test:test123@10.17.168.224:3128/)"

"proxy" : {  
"host" : "10.17.168.224",  
"port" : "3128",  
"scheme" : "http",  
"user" : "test,  
"password" : "test"  
}

Every time i am unable to push the data .

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 12, 2019, 12:20pm UTC](https://discuss.elastic.co/t/configuring-proxy-in-http-out-plugin/194785/2 "2019-08-12T12:20:19Z")

</div>

What error do you get?

---

<div class="post-metadata">

**Author:** ![rameshpasunoori](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rameshpasunoori](https://discuss.elastic.co/u/rameshpasunoori)\
**Post date:** [August 13, 2019, 10:51am UTC](https://discuss.elastic.co/t/configuring-proxy-in-http-out-plugin/194785/3 "2019-08-13T10:51:26Z")

</div>

Proxy Config 1:

http {  
http\_method =\> "post"  
url =\> "[http://server.net/ingestion](http://server.net/ingestion)"  
format =\> "message"  
headers =\> {"Content-Type" =\> "application/json"}  
content\_type =\> "application/json"  
message =\> '%{message}'  
pool\_max =\> 100  
pool\_max\_per\_route =\> 100  
proxy =\> {host =\> "10.17.168.224", port =\> 3128, scheme =\> 'http', user =\> 'test', password =\> 'test'}  
}

## Error:

[2019-08-13T03:45:09,850][ERROR][logstash.agent] Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:srm\_test\_pl, :exception=\>"LogStash::ConfigurationError", :message=\>"Expected one of #, {, } at line 112, column 46 (byte 5238) after output {\r\n\r\n file {\r\n path =\> "{RDBCOLLECTOR\_LOGSTASH\_HOME}/{RDBCOLLECTOR\_CONTAINER\_NAME}/test/test\_info\_{RDBCOLLECTOR\_JDBC\_HOST}.json\"\r\n write\_behavior =\> overwrite\r\n }\r\n if ( !([@metadata][ingestIntoJarvis] == \"true\") ) { \r\n #elasticsearch {\r\n # hosts =\> \"{ES\_HTTP\_HOSTS}"\r\n # index =\> "test\_1"\r\n # document\_id =\> "%{test\_unique\_key}"\r\n # document\_type =\> "data"\r\n #}\r\n }\r\n else { \r\n http {\r\n http\_method =\> "post"\r\n url =\> "[http://server.net/ingestion](http://server.net/ingestion)"\r\n format =\> "message"\r\n headers =\> {"Content-Type" =\> "application/json"}\r\n content\_type =\> "application/json"\r\n message =\> '%{message}'\r\n pool\_max =\> 100\r\n pool\_max\_per\_route =\> 100\r\n proxy =\> {host =\> "10.17.168.224"", :backtrace=\>["C:/logstash-7.2.0/logstash-core/lib/logstash/compiler.rb:41:in `compile_imperative'", "C:/logstash-7.2.0/logstash-core/lib/logstash/compiler.rb:49:in`compile\_graph'", "C:/logstash-7.2.0/logstash-core/lib/logstash/compiler.rb:11:in `block in compile_sources'", "org/jruby/RubyArray.java:2577:in`map'", "C:/logstash-7.2.0/logstash-core/lib/logstash/compiler.rb:10:in `compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:151:in`initialize'", "org/logstash/execution/JavaBasePipelineExt.java:47:in `initialize'", "C:/logstash-7.2.0/logstash-core/lib/logstash/java_pipeline.rb:24:in`initialize'", "C:/logstash-7.2.0/logstash-core/lib/logstash/pipeline\_action/create.rb:36:in `execute'", "C:/logstash-7.2.0/logstash-core/lib/logstash/agent.rb:325:in`block in converge\_state'"]}

## Proxy config 2:

http {  
http\_method =\> "post"  
url =\> "[http://server.net/ingestion](http://server.net/ingestion)"  
format =\> "message"  
headers =\> {"Content-Type" =\> "application/json"}  
content\_type =\> "application/json"  
message =\> '%{message}'  
pool\_max =\> 100  
pool\_max\_per\_route =\> 100  
"proxy" : {  
"host" : "10.17.168.224",  
"port" : "3128",  
"scheme" : "http",  
"user" : "test,  
"password" : "test"  
}  
}

## Error:

Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:srm\_test\_pl, :exception=\>"LogStash::ConfigurationError", :message=\>"Expected one of #, =\> at line 112, column 21 (byte 5213) after output {\r\n\r\n file {\r\n path =\> "{RDBCOLLECTOR\_LOGSTASH\_HOME}/{RDBCOLLECTOR\_CONTAINER\_NAME}/test/test\_info\_{RDBCOLLECTOR\_JDBC\_HOST}.json\"\r\n write\_behavior =\> overwrite\r\n }\r\n if ( !([@metadata][ingestIntoJarvis] == \"true\") ) { \r\n #elasticsearch {\r\n # hosts =\> \"{ES\_HTTP\_HOSTS}"\r\n # index =\> "test\_1"\r\n # document\_id =\> "%{test\_unique\_key}"\r\n # document\_type =\> "data"\r\n #}\r\n }\r\n else { \r\n http {\r\n http\_method =\> "post"\r\n url =\> "[http://server.net/ingestion](http://server.net/ingestion)"\r\n format =\> "message"\r\n headers =\> {"Content-Type" =\> "application/json"}\r\n content\_type =\> "application/json"\r\n message =\> '%{message}'\r\n pool\_max =\> 100\r\n pool\_max\_per\_route =\> 100\r\n "proxy" ", :backtrace=\>["C:/logstash-7.2.0/logstash-core/lib/logstash/compiler.rb:41:in `compile_imperative'", "C:/logstash-7.2.0/logstash-core/lib/logstash/compiler.rb:49:in`compile\_graph'", "C:/logstash-7.2.0/logstash-core/lib/logstash/compiler.rb:11:in `block in compile_sources'", "org/jruby/RubyArray.java:2577:in`map'", "C:/logstash-7.2.0/logstash-core/lib/logstash/compiler.rb:10:in `compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:151:in`initialize'", "org/logstash/execution/JavaBasePipelineExt.java:47:in `initialize'", "C:/logstash-7.2.0/logstash-core/lib/logstash/java_pipeline.rb:24:in`initialize'", "C:/logstash-7.2.0/logstash-core/lib/logstash/pipeline\_action/create.rb:36:in `execute'", "C:/logstash-7.2.0/logstash-core/lib/logstash/agent.rb:325:in`block in converge\_state'"]}

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 13, 2019, 12:59pm UTC](https://discuss.elastic.co/t/configuring-proxy-in-http-out-plugin/194785/4 "2019-08-13T12:59:34Z")

</div>

I know the documentation says to use a comma between entries. The documentation is wrong. Just use the usual hash notation.

```
 proxy => {host => "10.17.168.224" port => 80 scheme => 'http' user => 'username@host' password => 'password'}
```

---

<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:** [September 10, 2019, 12:59pm UTC](https://discuss.elastic.co/t/configuring-proxy-in-http-out-plugin/194785/5 "2019-09-10T12:59:35Z")

</div>

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