Hello,
I have a pretty basic use case for which I am unable to use log stash as intended and would appreciate community's help.
There are 'n' keys that are part of a URL. These keys keep changing on daily basis and I would like to loop through 'n URLs ' formed from those keys and store the data in index.
Below is my conf file where I am using 1 hardcoded key.
input
{
http_poller
{
urls =>
{
logs =>
{
method => get
url => "https://someURL/Hardcoded Key value"
headers => {
accept => "application/json"
}
}
}
codec => "json_lines"
schedule => { every => "1m"}
}
}
filter
{
json
{
source => "message"
some filtering here
}
}
output
{
elasticsearch
{
hosts => ["http://localhost:9200"]
index => "MyIndex"
user => "UN"
password => "PW"
}
}
I am looking for a way to use variable for the "key" component in URL and call this script 'n' times.
I am open to other suggestions as well.