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

#1

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.

#2

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.

#3

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

#4

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

#5

No need for filebeat.

#6

Thanks