Consume a rest Api like openweather websites by logstash to store in elasticsearch

I am new to elasticsearch. What I am looking for is to be able to call any external webservices like openweather which requires any api key or either id and password, and be able to consume the response by logstash in json.

my goal is to store this info in the elasticsearch.
Also if i could filter the data when i receive in logstash before storing in elasticSearch.
Is there any tool or way to do this.

You might be able to do it with an http_poller input.

For some use cases that does not work and you might have to use an http filter. In that case you would need some other input to generate events, which might be as simple as

input { generator { count => 1 message => '' } }

logstash can certainly support many such use cases. If you search this forum for the word openweather you will find examples of folks doing this and their configurations.

Thanks for the prompt reply. I will look in to it.

Does this need something like filebeat. or logstash can take json from the webservices directly and feed to elasticsearch

No need for filebeat.


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