Proxy Config 1:
http {
http_method => "post"
url => "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"\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"
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"\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'"]}