Passing input values to logstash from external file

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"
}
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

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.

@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

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

Thanks
Gauti

Any help here please :frowning:

Thanks
Gauti

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