How to pass dynamic parameters in Logstash input

How to pass dynamic parameters in Logstash input

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

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

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

2 Likes

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