# Passing input values to logstash from external file

**URL:** https://discuss.elastic.co/t/passing-input-values-to-logstash-from-external-file/139766
**Category:** Logstash
**Created:** [July 12, 2018, 1:34pm UTC](https://discuss.elastic.co/t/passing-input-values-to-logstash-from-external-file/139766 "2018-07-12T13:34:37Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Gauti](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gauti](https://discuss.elastic.co/u/Gauti)
#### Post date: [July 12, 2018, 1:34pm UTC](https://discuss.elastic.co/t/passing-input-values-to-logstash-from-external-file/139766/1 "2018-07-12T13:34:37Z")

</div>

Hi All,

I have been trying to use logstash http\_poller method to fetch data from one of my source.

The plan is to pull data from a restapi source which requires an URL, user ccredentials i was able to pass these two fields in the config file itself.  
For a successful data retrieval i need to pass an input value as well, when i put the values in a path i'm getting error like **"Unknown setting 'path' for http\_poller"**

**Here is my config file:**

input {  
http\_poller {  
urls =\> {  
url =\> "[https://pilot.nanoheal.com/DashboardAPI/api/asset/getBasicInfo](https://pilot.nanoheal.com/DashboardAPI/api/asset/getBasicInfo)"  
}  
request\_timeout =\> 60  
proxy =\> { host =\> "10.1.1.2" port =\> "9999" scheme =\> "http"}  
user =\> "\*\*\*\*\*\*"  
password =\> "\*\*\*\*\*_"  
schedule =\> { cron =\> "_ \* \* \* \*"}  
path =\> ["/usr/share/logstash/bin/config/inputnanoheal.json"]  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"  
codec =\> "json"  
metadata\_target =\> "http\_poller\_metadata"  
}  
}  
#filter

# {

# split

# {

# field =\> "result"

# }

#}  
output {

# elasticsearch {

# hosts =\> ["10.2.1.1:9200"]

# index =\> "snow"

# }

stdout {  
codec =\> json  
}  
}

**inputnanoheal.json** : This file has the inputs to be passed.

Any advice please.

Thanks  
Gauti

---

<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: [July 12, 2018, 2:37pm UTC](https://discuss.elastic.co/t/passing-input-values-to-logstash-from-external-file/139766/2 "2018-07-12T14:37:13Z")

</div>

And inputnanoheal.json would contain the body of the HTTP request? That's not supported, see [https://github.com/logstash-plugins/logstash-input-http\_poller/issues/61](https://github.com/logstash-plugins/logstash-input-http_poller/issues/61).

---

<div class="post-metadata">

### Author: ![Gauti](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gauti](https://discuss.elastic.co/u/Gauti)
#### Post date: [July 12, 2018, 2:56pm UTC](https://discuss.elastic.co/t/passing-input-values-to-logstash-from-external-file/139766/3 "2018-07-12T14:56:47Z")

</div>

@magnusbaeck This is the input value which inputnanoheal.json has

'{"scop":"ServiceTag","scopvalue":"LAPTOP"}'

Is there any way to pass this inside the config file itself? any advice on how to proceed in this situation?

Thanks  
Gauti

---

<div class="post-metadata">

### Author: ![Gauti](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gauti](https://discuss.elastic.co/u/Gauti)
#### Post date: [July 17, 2018, 1:31pm UTC](https://discuss.elastic.co/t/passing-input-values-to-logstash-from-external-file/139766/4 "2018-07-17T13:31:19Z")

</div>

hi @Rom1 have gone through you post in the below link where you succeeded running a curl command through logstash, can you please share your config file or an example of config file.

I'm got stuck in executing a curl command through logstash.

Your Post : [Http\_poller with kerberos / NTLM authentication](https://discuss.elastic.co/t/http-poller-with-kerberos-ntlm-authentication/62867)

Thanks  
Gauti

---

<div class="post-metadata">

### Author: ![Gauti](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gauti](https://discuss.elastic.co/u/Gauti)
#### Post date: [July 18, 2018, 2:23pm UTC](https://discuss.elastic.co/t/passing-input-values-to-logstash-from-external-file/139766/5 "2018-07-18T14:23:29Z")

</div>

Any help here please ☹

Thanks  
Gauti

---

<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 15, 2018, 2:23pm UTC](https://discuss.elastic.co/t/passing-input-values-to-logstash-from-external-file/139766/6 "2018-08-15T14:23:31Z")

</div>

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