Sprintf not working within single conf file


(Ritesh) #1

Hi All

I have 2 Input and 1 Output, i need to pass the field value from Input 1 (elastic) to Input 2 ( http) and then do the processing in pipeline.

Below is my conf file, please let me know what is the best way to provide the sprint f, currently i have provided "%{number}" in second input. This field "number" is present in "test1" index.
I need to pass this "%{number}" to http request to get the response and store it in "test2" index

Basically i am not able to pass the field value from input1 to input2

input {

    elasticsearch { 
       hosts => "localhost:9200"	   
       index => "test1"

    }
	
	
  http_poller {
    urls => {
      request => {
        method => post
        url => "http://localhost:7001/......................"
        headers => {
		   "Host" => "localhost:7001"
		   "Accept-Encoding" => "gzip,deflate"
        }
        body => '<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://xmlns.oracle.com/Objects/V1">
   <soapenv:Header/>
   <soapenv:Body>
      <v1:getObject>
         <request>
            <requests>
               <classIdentifier>Class</classIdentifier>
               <objectNumber>%{number}</objectNumber>
         </request>
      </v1:getObject>
   </soapenv:Body>
</soapenv:Envelope>'
        }
    }
    request_timeout => 60000
    interval => 60
    codec => "plain"
  }
}

filter{
  
    
 
 }

output {  
stdout { codec => rubydebug}
    elasticsearch { 
	   action => "index"
       hosts => "localhost:9200"	   
       index => "test2"

    }
 }

(Magnus B├Ąck) #2

I have 2 Input and 1 Output, i need to pass the field value from Input 1 (elastic) to Input 2 ( http) and then do the processing in pipeline.

That's not possible.


(system) #3

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