M
M
marcel bostan2016-01-25 19:03:51
logstash
marcel bostan, 2016-01-25 19:03:51

How can I dynamically change the url value in Logstash?

Good evening,
I want to query the logstash config file one api at a time while the value of page from url < n number, for example 100.

input {
  http_poller {
    urls => {
      test1 => {
        method => get
        url => "https://api.opencorporates.com/v0.4/companies/search?jurisdiction_code=cy&page=2"
        headers => {
          Accept => "application/json"
        }       
      }
    }
    request_timeout => 60
    interval => 60
    codec => "json"
    metadata_target => "http_poller_metadata"
  }
}

Thanks for the help.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question