How to pass dynamic parameters in Logstash input


(Rajesh Bongoni) #1

How to pass dynamic parameters in Logstash input


(Ed) #2

what do you mean pass dynamic parameters? Can you provide some sudo-code/explain what your trying to do?


(Rajesh Bongoni) #3

Here is my input
http_poller {
urls => {
q1 => {
method => get
url => "https://jsonplaceholder.typicode.com/posts/id=?"
headers => {
Accept => "application/json"
}
}
}
id => "test1"
tags => "firsttag"
codec => "json"
request_timeout => 60
metadata_target => "http_poller_metadata"
schedule => { cron => "* * * * * UTC"}
}

I want to pass the "id" value


(Magnus B├Ąck) #4

Pass from where? Your best bet is probably https://www.elastic.co/guide/en/logstash/current/environment-variables.html.


(system) #5

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