# Sprintf not working within single conf file

**URL:** <https://discuss.elastic.co/t/sprintf-not-working-within-single-conf-file/101567>\
**Category:** Logstash\
**Created:** [September 23, 2017, 1:55pm UTC](https://discuss.elastic.co/t/sprintf-not-working-within-single-conf-file/101567 "2017-09-23T13:55:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkhapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rkhapre/32/48333_2.png) [@rkhapre](https://discuss.elastic.co/u/rkhapre)\
**Post date:** [September 23, 2017, 1:55pm UTC](https://discuss.elastic.co/t/sprintf-not-working-within-single-conf-file/101567/1 "2017-09-23T13:55:41Z")

</div>

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"

    }
 }
```

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 24, 2017, 8:39pm UTC](https://discuss.elastic.co/t/sprintf-not-working-within-single-conf-file/101567/2 "2017-09-24T20:39:02Z")

</div>

> 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.

---

<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:** [October 22, 2017, 8:39pm UTC](https://discuss.elastic.co/t/sprintf-not-working-within-single-conf-file/101567/3 "2017-10-22T20:39:31Z")

</div>

Closed on October 22, 2017, 8:39pm UTC

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